Allow translations of activerecord.errors.messages.record_invalid to be looked up in errors.messages.record_invalid

This commit is contained in:
Christopher Dell 2012-03-05 00:17:47 +01:00
parent f8f66a3792
commit 4da6e1cce2
1 changed files with 1 additions and 1 deletions

View File

@ -14,7 +14,7 @@ module ActiveRecord
def initialize(record)
@record = record
errors = @record.errors.full_messages.join(", ")
super(I18n.t("activerecord.errors.messages.record_invalid", :errors => errors))
super(I18n.t(:"#{@record.class.i18n_scope}.errors.messages.record_invalid", :errors => errors, :default => :"errors.messages.record_invalid"))
end
end