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? -

c# - SharpSVN - How to get the previous revision? -

php cli reading files and how to fix it? -