Hi,
I have a question about html tag helper methods.
Is there any good way to add model.id value to 'name' and 'id' attributes?
For example, assume the following view code:
<%= form_for model, :action => '/path' %>
<%= text_field :attr, :label=>"LABEL" %>
<% end =%>
text_filed() helper in the above code will generates the following
<label> and <input> tags:
<label for="model_attr">LABEL</label>
<input type="text" value="" class="text" name="model[attr]"
id="model_attr"/>
But I want to generate:
<label for="model_attr_123">LABEL</label>
<input type="text" value="" class="text" name="model[123][attr]"
id="model_attr_123"/>
(assume that model.id == 123)
Is there any good way to do that?
--
regards,
makoto kuwata
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"merb" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/merb?hl=en
-~----------~----~----~----~------~----~------~--~---