I study RailSpace code and the line code in the book

  @error_messages = ActiveRecord::Errors.default_error_messages

has been deprecated. Instead the following is recommended

  @error_messages = I18n.translate('activerecord.errors.messages')

But the line
 correct_error_message = sprintf(@error_messages[:too_short],
                                 :count=>min_length)

does not assign the value min_length to {{count}} part of
@error_messages[:too_short] "is too short (minimum is {{count}}
characters)" .

I do not know how to set the min_length value to {{count}} in
error_messages[:too_short].

Thanks.

Tim
-- 
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