Bla ... wrote:
> I try to put in quotes, but it also doesn't works...

Can you paste the content that it renders? Also, does anything scroll by 
in your server window when you try this?

Additionally, wanted to mention that error_messages_for was removed from 
Rails 3, though available as a plugin. So maybe consider just going with 
a custom solution now. Here is an snippet that I've used, though note it 
is in HAML, not ERB.

# views/shared/_error_messages.html.haml

- if target.errors.any?
  #errorExplanation
    %h2= "#{pluralize(target.errors.count, 'error')} prohibited this 
record from being saved:"
    %ul
      - target.errors.full_messages.each do |message|
        %li= message

Then used with

# views/thingy/_form.html.haml

#errors= render 'shared/error_messages', :target => @company

You get a bit more control over what is going on here and are protected 
against the imminent removal of the helper.
-- 
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to