Skip to content
This repository
Browse code

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
Christopher Dell authored March 05, 2012
2  activerecord/lib/active_record/validations.rb
@@ -14,7 +14,7 @@ class RecordInvalid < ActiveRecordError
14 14
     def initialize(record)
15 15
       @record = record
16 16
       errors = @record.errors.full_messages.join(", ")
17  
-      super(I18n.t("activerecord.errors.messages.record_invalid", :errors => errors))
  17
+      super(I18n.t(:"#{@record.class.i18n_scope}.errors.messages.record_invalid", :errors => errors, :default => :"errors.messages.record_invalid"))
18 18
     end
19 19
   end
20 20
 

0 notes on commit 4da6e1c

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