Forum: Ruby on Rails Problem w/ error_messages_for: wrong number of arguments?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Graham G. (Guest)
on 2006-04-11 09:34
Hi guys,

I just upgraded to the latest version of Rails 1.1 and am getting some
odd error messages. Specifically, I have the line:

<%= error_messages_for 'user' %>

at the top of one of my .rhtml files and of course a variable @user.
When an error occurs when saving 'user', instead of getting the error
message (which happened fine in Rails 1.0), I now get the message:

wrong number of arguments (2 for 1)

with the traceback:


If I look at the line in active_record_helper that calls pluralize, it

"#{pluralize(object.errors.count, "error")} prohibited this
#{object_name.to_s.gsub("_", " ")} from being saved"

This makes me think that the runtime system is calling the wrong version
of pluralize (the Inflector version which doesn't take 2 arguments.

Has anyone else encountered the same problem or have an ideas how to fix

This topic is locked and can not be replied to.