1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Remove unused aliased_table_name in Association

`aliased_table_name` in `Association` was added at a3502c4.
`aliased_table_name` in `JoinDependency` (added at 55854c4) is used, but
it looks like that added one in `Association` is never used from the
beginning.
This commit is contained in:
Ryuta Kamizono 2017-06-29 05:35:34 +09:00
parent 8c65abe5f8
commit 4aa4a449e0
2 changed files with 0 additions and 9 deletions

View file

@ -30,14 +30,6 @@ module ActiveRecord
reset_scope
end
# Returns the name of the table of the associated class:
#
# post.comments.aliased_table_name # => "comments"
#
def aliased_table_name
klass.table_name
end
# Resets the \loaded flag to +false+ and sets the \target to +nil+.
def reset
@loaded = false

View file

@ -380,7 +380,6 @@ class BelongsToAssociationsTest < ActiveRecord::TestCase
sponsor.sponsorable = Member.new name: "Bert"
assert_equal Member, sponsor.association(:sponsorable).send(:klass)
assert_equal "members", sponsor.association(:sponsorable).aliased_table_name
end
def test_with_polymorphic_and_condition