Rails 2.2.2
In a view partial, When I do this:
<%= label client_detail.class.to_s.downcase,
:client_credit_limit,
"Credit Limit: ",
:class => :input_box_label,
:for => 'input_client_credit_limit
-%>
<%= ff.text_field :client_credit_limit,
:id => 'input_client_credit_limit',
:size => 12,
:value => client_detail.client_credit_limit
-%>
</p>
Then I see this:
<label class="input_box_label"
for="input_client_credit_limit">
Credit Limit:
</label>
<input
id="input_client_credit_limit"
name="client[client_credit_limit]"
size="12" type="text" value="0" />
But, when I do this:
<%= label :client,
:client_credit_policy,
"Credit Policy",
:class => :input_box_label
-%>
<%= ff.select :client_credit_policy,
[ ['CASH - Advance Billing', 'CASH'],
['OPEN - Open Account', 'OPEN'],
],
:prompt => 'Select Credit Policy Code',
:size => 4
-%>
Then I see this:
<label
class="input_box_label"
for="select_client_credit_policy">
Credit Policy
</label>
<select
id="client_client_credit_policy"
name="client[client_credit_policy]">
<option value="CASH" selected="selected">
CASH - Advance Billing</option>
<option value="OPEN">
OPEN - Open Account</option>
</select>
Select does not honour the :id => ‘text’ option when provided. Instead
it creates an id of the form _. However, text_field
does honour the :id => ‘text’ option if given.
Is this a bug?