ActiveRecord: default_error_messages is deprecated since Rails2.2, below shows the new way.

来源:互联网 发布:海盗港新域名 编辑:程序博客网 时间:2024/05/17 23:43

 

short_message ||= I18n.translate('activerecord.errors.messages.too_short', :count => range.first)

long_message ||= I18n.translate('activerecord.errors.messages.too_long', :count => range.last)

原创粉丝点击