ruby on rails - Hide a Collection_Select Option -


i have dropdown built option_groups_from_collection_for_select(category.all, :subcategories, :name, :id, :name). how can hide 1 of categories appears?

instead of category.all, can pass in

category.where("id not in (?)", [1, 2, 3]) 

that exclude categories ids 1, 2 , 3.


Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -