diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2017-06-29 05:35:34 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2017-06-29 06:00:17 +0900 |
commit | 4aa4a449e0de9d01067f9f74ba1ad47829c2715d (patch) | |
tree | 455792562e7e29d29b00b059b13acd0f096791cd /activerecord | |
parent | 8c65abe5f804522bcbf0d6f4327e7dfad0603941 (diff) | |
download | rails-4aa4a449e0de9d01067f9f74ba1ad47829c2715d.tar.gz rails-4aa4a449e0de9d01067f9f74ba1ad47829c2715d.tar.bz2 rails-4aa4a449e0de9d01067f9f74ba1ad47829c2715d.zip |
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.
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/associations/association.rb | 8 | ||||
-rw-r--r-- | activerecord/test/cases/associations/belongs_to_associations_test.rb | 1 |
2 files changed, 0 insertions, 9 deletions
diff --git a/activerecord/lib/active_record/associations/association.rb b/activerecord/lib/active_record/associations/association.rb index 44cf1f8915..1138ae3462 100644 --- a/activerecord/lib/active_record/associations/association.rb +++ b/activerecord/lib/active_record/associations/association.rb @@ -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 diff --git a/activerecord/test/cases/associations/belongs_to_associations_test.rb b/activerecord/test/cases/associations/belongs_to_associations_test.rb index c8b26232b6..a727cc6e60 100644 --- a/activerecord/test/cases/associations/belongs_to_associations_test.rb +++ b/activerecord/test/cases/associations/belongs_to_associations_test.rb @@ -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 |