Suppose we use bootstrap_form_tag:
= bootstrap_form_tag url: categories_path_generator(@category), method: :get do |f|
= f.select :region, StaticData::REGIONS.map.with_index {|index, region| [index, region] }, include_blank: true, selected: params[:region]
Then I got strange id of any field starts with underscore:
If I try to use form namespace, like this:
I also get strange id with double underscore in the middle:
I saw the code, it looks like you use form_for without model instead to use form_tag in that case. And first one makes this underscore because is waiting for model/record name.
Also I can't set id of any field manually:
f.text_field :region, id: 'ads_field_region'
or
f.text_field :region, html: { id: 'ads_field_region' }
In both cases I get id generated by form_for:
Bug or feature?
Suppose we use bootstrap_form_tag:
Then I got strange id of any field starts with underscore:
If I try to use form namespace, like this:
I also get strange id with double underscore in the middle:
I saw the code, it looks like you use form_for without model instead to use form_tag in that case. And first one makes this underscore because is waiting for model/record name.
Also I can't set id of any field manually:
In both cases I get id generated by form_for:
Bug or feature?