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
Post a Comment