Forum: Ruby on Rails a newbie question about setting value for {{var}}

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Tim C. (Guest)
on 2008-12-28 04:47
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
This topic is locked and can not be replied to.