ruby on rails 4 - Dynamically create attr_accessor? -


i implementing advanced search form in fields added dynamically. have product belongs_to pharmacy belongs_to network.

i want user able add more networks form example if wants search products 2 different networks.

any tips on how dynamically create field? in mind should implement sort of attr_accessor created user press + in view. don't think possible.

thanks suggestions!

you should never create accessors based on user input.

instead add in form array-like fields (i.e. field[]) or hash-like (i.e. field[1])


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -