Skip to content
Browse files

Allow translations of activerecord.errors.messages.record_invalid to …

…be looked up in errors.messages.record_invalid
  • Loading branch information...
1 parent f8f66a3 commit 4da6e1cce2833474034fda0cbb67b2cc35e828da @tigrish tigrish committed Mar 5, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/validations.rb
View
2 activerecord/lib/active_record/validations.rb
@@ -14,7 +14,7 @@ class RecordInvalid < ActiveRecordError
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

0 comments on commit 4da6e1c

Please sign in to comment.
Something went wrong with that request. Please try again.