diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-09-24 06:33:36 -0700 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-09-24 06:33:36 -0700 |
commit | e029e0267206c603503db06eb48a0bbc3b2ed609 (patch) | |
tree | c857d7471241cec1aa20ec1659a27b9d06986f19 | |
parent | 8640fb89a0cab62e623a6c65bbaf070598c6db55 (diff) | |
parent | bb54fcdfadcab3d69b46da384d00abfd09626031 (diff) | |
download | rails-e029e0267206c603503db06eb48a0bbc3b2ed609.tar.gz rails-e029e0267206c603503db06eb48a0bbc3b2ed609.tar.bz2 rails-e029e0267206c603503db06eb48a0bbc3b2ed609.zip |
Merge pull request #11423 from kennyj/remove_quoted_locking_column
Remove unused quoted_locking_column method.
-rw-r--r-- | activerecord/CHANGELOG.md | 4 | ||||
-rw-r--r-- | activerecord/lib/active_record/locking/optimistic.rb | 1 | ||||
-rw-r--r-- | activerecord/test/cases/locking_test.rb | 4 |
3 files changed, 9 insertions, 0 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index c255f59b00..4e966ce5dc 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -1,3 +1,7 @@ +* Deprecate `quoted_locking_column` method, which isn't used anywhere. + + *kennyj* + * Migration dump UUID default functions to schema.rb. Fixes #10751. diff --git a/activerecord/lib/active_record/locking/optimistic.rb b/activerecord/lib/active_record/locking/optimistic.rb index 626fe40103..55776a91c0 100644 --- a/activerecord/lib/active_record/locking/optimistic.rb +++ b/activerecord/lib/active_record/locking/optimistic.rb @@ -150,6 +150,7 @@ module ActiveRecord # Quote the column name used for optimistic locking. def quoted_locking_column + ActiveSupport::Deprecation.warn "ActiveRecord::Base.quoted_locking_column is deprecated and will be removed in Rails 4.2 or later." connection.quote_column_name(locking_column) end diff --git a/activerecord/test/cases/locking_test.rb b/activerecord/test/cases/locking_test.rb index dfa12cb97c..a16ed963fe 100644 --- a/activerecord/test/cases/locking_test.rb +++ b/activerecord/test/cases/locking_test.rb @@ -272,6 +272,10 @@ class OptimisticLockingTest < ActiveRecord::TestCase assert p.treasures.empty? assert RichPerson.connection.select_all("SELECT * FROM peoples_treasures WHERE rich_person_id = 1").empty? end + + def test_quoted_locking_column_is_deprecated + assert_deprecated { ActiveRecord::Base.quoted_locking_column } + end end class OptimisticLockingWithSchemaChangeTest < ActiveRecord::TestCase |