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

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.
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],

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


This topic is locked and can not be replied to.