diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2017-06-29 08:25:45 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-29 08:25:45 -0400 |
commit | 4448873c8755524ccadd639d1a08df53496c36d7 (patch) | |
tree | 6708879441a56c0653f04cc3c95dde71df3c0688 /activerecord | |
parent | ae751b8f6cfe0fa1846a05eab5f472b852d66d5a (diff) | |
parent | 4aa4a449e0de9d01067f9f74ba1ad47829c2715d (diff) | |
download | rails-4448873c8755524ccadd639d1a08df53496c36d7.tar.gz rails-4448873c8755524ccadd639d1a08df53496c36d7.tar.bz2 rails-4448873c8755524ccadd639d1a08df53496c36d7.zip |
Merge pull request #29616 from kamipo/remove_unused_aliased_table_name
Remove unused `aliased_table_name` in `Association`
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 |