mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Deprecate unused quoted_locking_column method.
This commit is contained in:
parent
50ddf40412
commit
bb54fcdfad
3 changed files with 9 additions and 0 deletions
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue