Displaying 2 results from an estimated 2 matches for "comment_42_author".
2006 Jan 19
5
TIP: Using field_error_proc to add style attributes to form elements
I just put this up on the wiki, and thought I''d share in case it''s
useful to anyone else. This is handy if you don?t want to wrap your
input elements inside a div when an error occurs, but instead want to
add some sort of CSS style to fields with errors:
ActionView::Base.field_error_proc = Proc.new do |html_tag, instance|
msg = instance.error_message
error_style =
2006 Feb 03
2
_form rendering question for adding multiple child objects
...'', ''body'' %>
> <% end %>
>
> The FormTagHelper will pick up the square brackets and realize you
> want the index of the object in there, producing HTML like this:
>
> <input type="text" name="comment[42][author]" id="comment_42_author"
> value="Duane">
> <input type="text" name="comment[42][body]" id="comment_42_body"
> value="I think your site is great...">
The trouble is, while this would work for editing existing objects, is
there a similar workaround...