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 <model>_<attribute>. However,
text_field
does honour the :id => ''text'' option if given.
Is this a bug?
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---