Skip to content

Commit

Permalink
Merge pull request #11423 from kennyj/remove_quoted_locking_column
Browse files Browse the repository at this point in the history
Remove unused quoted_locking_column method.
  • Loading branch information
rafaelfranca committed Sep 24, 2013
2 parents 8640fb8 + bb54fcd commit e029e02
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions 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.
Expand Down
1 change: 1 addition & 0 deletions activerecord/lib/active_record/locking/optimistic.rb
Expand Up @@ -150,6 +150,7 @@ def locking_column

# 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

Expand Down
4 changes: 4 additions & 0 deletions activerecord/test/cases/locking_test.rb
Expand Up @@ -272,6 +272,10 @@ def test_removing_has_and_belongs_to_many_associations_upon_destroy
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
Expand Down

0 comments on commit e029e02

Please sign in to comment.