diff options
author | Yves Senn <yves.senn@gmail.com> | 2013-07-22 09:57:51 +0300 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2013-07-22 09:57:51 +0300 |
commit | ff3739e6d5da61cf49e4f4a1d281b289f6222f9a (patch) | |
tree | 2397c5140ee042726aa69de70dbf6a44928e5e97 /activerecord/lib | |
parent | c43db5564a48bc41ae55cead400af066337e63b6 (diff) | |
download | rails-ff3739e6d5da61cf49e4f4a1d281b289f6222f9a.tar.gz rails-ff3739e6d5da61cf49e4f4a1d281b289f6222f9a.tar.bz2 rails-ff3739e6d5da61cf49e4f4a1d281b289f6222f9a.zip |
Revert "Merge pull request #11416 from tigrish/master"
This reverts commit 9dc8aef084fc5ae7e3a396dd098d89da93d06fda, reversing
changes made to 02e8dae6279ea25312293a3eca777faf35139c4c.
Diffstat (limited to 'activerecord/lib')
3 files changed, 4 insertions, 4 deletions
diff --git a/activerecord/lib/active_record/associations/has_many_association.rb b/activerecord/lib/active_record/associations/has_many_association.rb index 6e722616bf..607ed0da46 100644 --- a/activerecord/lib/active_record/associations/has_many_association.rb +++ b/activerecord/lib/active_record/associations/has_many_association.rb @@ -15,7 +15,7 @@ module ActiveRecord when :restrict_with_error unless empty? record = klass.human_attribute_name(reflection.name).downcase - owner.errors.add(:base, :"restrict_dependent_destroy.has_many", record: record) + owner.errors.add(:base, :"restrict_dependent_destroy.many", record: record) false end diff --git a/activerecord/lib/active_record/associations/has_one_association.rb b/activerecord/lib/active_record/associations/has_one_association.rb index 5791602846..3ab1ea1ff4 100644 --- a/activerecord/lib/active_record/associations/has_one_association.rb +++ b/activerecord/lib/active_record/associations/has_one_association.rb @@ -12,7 +12,7 @@ module ActiveRecord when :restrict_with_error if load_target record = klass.human_attribute_name(reflection.name).downcase - owner.errors.add(:base, :"restrict_dependent_destroy.has_one", record: record) + owner.errors.add(:base, :"restrict_dependent_destroy.one", record: record) false end diff --git a/activerecord/lib/active_record/locale/en.yml b/activerecord/lib/active_record/locale/en.yml index 3a81e15532..b1fbd38622 100644 --- a/activerecord/lib/active_record/locale/en.yml +++ b/activerecord/lib/active_record/locale/en.yml @@ -15,8 +15,8 @@ en: messages: record_invalid: "Validation failed: %{errors}" restrict_dependent_destroy: - has_one: "Cannot delete record because a dependent %{record} exists" - has_many: "Cannot delete record because dependent %{record} exist" + one: "Cannot delete record because a dependent %{record} exists" + many: "Cannot delete record because dependent %{record} exist" # Append your own errors here or at the model/attributes scope. # You can define own errors for models or model attributes. |