Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

…be looked up in errors.messages.record_invalid
  • Loading branch information...
commit 4da6e1cce2833474034fda0cbb67b2cc35e828da 1 parent f8f66a3
@tigrish tigrish authored
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
Please sign in to comment.
Something went wrong with that request. Please try again.