Displaying 1 result from an estimated 1 matches for "long_example_nam".
Did you mean:
long_example_name
2006 Apr 06
0
FormBuilder-friendly labels?
...;'m trying to find a good way to emit <label> tags inside a form_for()
block, without needing to repeat the name of the instance variable
constantly. Is there a better way to do this than the snippet below,
or do I need to do a little extension to the FormBuilder itself?
<% form_for :long_example_name, @long_example_name,
:url => { :action => :new } do |f| %>
<%= label_tag "long_example_name[some_attribute]", "Some Attribute:" %>
<%= f.text_field :some_attribute %>
<%= label_tag "long_example_name[some_other_attrib...