Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecated method ActiveRecord::Base.quoted_locking_column #15612

Merged
merged 1 commit into from Jun 10, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions activerecord/CHANGELOG.md
@@ -1,3 +1,7 @@
* Remove deprecated method `ActiveRecord::Base.quoted_locking_column`.

*Akshay Vishnoi*

* `ActiveRecord::FinderMethods.find` with block can handle proc parameter as
`Enumerable#find` does.

Expand Down
6 changes: 0 additions & 6 deletions activerecord/lib/active_record/locking/optimistic.rb
Expand Up @@ -151,12 +151,6 @@ def locking_column
@locking_column
end

# 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

# Reset the column used for optimistic locking back to the +lock_version+ default.
def reset_locking_column
self.locking_column = DEFAULT_LOCKING_COLUMN
Expand Down
4 changes: 0 additions & 4 deletions activerecord/test/cases/locking_test.rb
Expand Up @@ -272,10 +272,6 @@ 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