I want to use my rails a script helper as follows:
select_tag(:article_id, option_groups_from_collection_for_select( @article, :categories, :name, :id, :name, :include_blank => "Select one category"))
but nothing happens in my script. How can I use option_groups_from_colletion_for_select using the include_blank method?
include_blank is an option for the selection assistant, so you were almost there:
include_blank
select_tag(:article_id, option_groups_from_collection_for_select( @article, :categories, :name, :id, :name), {:include_blank => "Select one category"})
Source: https://habr.com/ru/post/1753015/More articles:Do browsers always use a cached version of a page with a .html extension? - htmlHow to set up a login system? - phpHow do you use twitter api? - twitterQuestion about application architecture - javaXAML: access StaticResource in plain XAML? (without markup extension) - validationFind application using port - c #JQuery Object Discovery - javascriptcreating a two-dimensional array of vectors - c ++Reporting, such as income / loss, etc. - sqlHow to add ssh key to connect to git? - gitAll Articles