diff options
-rw-r--r-- | activerecord/lib/active_record/associations/builder/has_many.rb | 3 | ||||
-rw-r--r-- | activerecord/lib/active_record/associations/builder/has_one.rb | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/activerecord/lib/active_record/associations/builder/has_many.rb b/activerecord/lib/active_record/associations/builder/has_many.rb index 0fe32b5f16..7d85f3fdb2 100644 --- a/activerecord/lib/active_record/associations/builder/has_many.rb +++ b/activerecord/lib/active_record/associations/builder/has_many.rb @@ -60,8 +60,7 @@ module ActiveRecord::Associations::Builder if dependent_restrict_raises? raise ActiveRecord::DeleteRestrictionError.new(name) else - errors.add(:base, I18n.t("activerecord.errors.messages.restrict_dependent_destroy", - :model => name)) + errors.add(:base, :restrict_dependent_destroy, :model => name) return false end end diff --git a/activerecord/lib/active_record/associations/builder/has_one.rb b/activerecord/lib/active_record/associations/builder/has_one.rb index d9fed4b7f2..9187f111a2 100644 --- a/activerecord/lib/active_record/associations/builder/has_one.rb +++ b/activerecord/lib/active_record/associations/builder/has_one.rb @@ -60,8 +60,7 @@ module ActiveRecord::Associations::Builder if dependent_restrict_raises? raise ActiveRecord::DeleteRestrictionError.new(name) else - errors.add(:base, I18n.t("activerecord.errors.messages.restrict_dependent_destroy", - :model => name)) + errors.add(:base, :restrict_dependent_destroy, :model => name) return false end end |