Skip to content

Commit eeb9c78

Browse files
committed
Remove deprecated ActiveRecord::Base.arel_attribute
1 parent 54ddb3b commit eeb9c78

File tree

5 files changed

+6
-22
lines changed

5 files changed

+6
-22
lines changed

activerecord/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
* Remove deprecated `ActiveRecord::Base.arel_attribute`.
2+
3+
*Rafael Mendonça França*
4+
15
* Remove deprecated `ActiveRecord::Base.connection_config`.
26

37
*Rafael Mendonça França*

activerecord/lib/active_record/core.rb

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -421,11 +421,6 @@ def arel_table # :nodoc:
421421
@arel_table ||= Arel::Table.new(table_name, klass: self)
422422
end
423423

424-
def arel_attribute(name, table = arel_table) # :nodoc:
425-
table[name]
426-
end
427-
deprecate :arel_attribute
428-
429424
def predicate_builder # :nodoc:
430425
@predicate_builder ||= PredicateBuilder.new(table_metadata)
431426
end

activerecord/lib/active_record/relation.rb

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,6 @@ def initialize_copy(other)
4141
reset
4242
end
4343

44-
def arel_attribute(name) # :nodoc:
45-
table[name]
46-
end
47-
deprecate :arel_attribute
48-
4944
def bind_attribute(name, value) # :nodoc:
5045
if reflection = klass._reflect_on_association(name)
5146
name = reflection.foreign_key

activerecord/test/cases/base_test.rb

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -95,18 +95,6 @@ def test_arel_attribute_normalization
9595
assert_equal Post.arel_table["body"], Post.arel_table[:text]
9696
end
9797

98-
def test_deprecated_arel_attribute
99-
assert_deprecated do
100-
assert_equal Post.arel_table["body"], Post.arel_attribute(:body)
101-
end
102-
end
103-
104-
def test_deprecated_arel_attribute_on_relation
105-
assert_deprecated do
106-
assert_equal Post.arel_table["body"], Post.all.arel_attribute(:body)
107-
end
108-
end
109-
11098
def test_incomplete_schema_loading
11199
topic = Topic.first
112100
payload = { foo: 42 }

guides/source/7_0_release_notes.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,8 @@ Please refer to the [Changelog][active-job] for detailed changes.
256256

257257
* Remove deprecated `ActiveRecord::Base.connection_config`.
258258

259+
* Remove deprecated `ActiveRecord::Base.arel_attribute`.
260+
259261
### Deprecations
260262

261263
* Deprecated `Rails.config.active_job.skip_after_callbacks_if_terminated`.

0 commit comments

Comments
 (0)