Ralph Shnelvar wrote:> I _think_ that in activerecord-2.2.2\lib\active_record\validations.rb
> that specifying the attribute as "" have the nice benefit of just
adding
> the specified message that was supplied.
>
> In activerecord-2.3.5\lib\active_record\validations.rb not specifying an
> attribute causes a "interning empty string" error.
>
> - - - -
>
> Is there a way in 2.3.5 to suppress the automatic generation of the
> error message. That is, in 2.2.2 I could do:
>
> model.errors.add("", "Your email address (#{value}) has an
invalid
> format.")
>
> This will fail in 2.3.5 with the above-mentioned "interning empty
> string".
>
> I think. I''m not sure. The code in 2.2.2 and 2.3.5 in this area
if
> pretty different and my test beds in these two environments is pretty
> different.
Adding to the above ...
Oh, geez, it looks like both the attribute and the message have to be
symbols.
Is this some attempt to force interaction with I18N?
--
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.