diff options
author | Jon Leighton <j@jonathanleighton.com> | 2012-04-11 16:18:36 -0700 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2012-04-11 16:18:36 -0700 |
commit | 19ecde00ff8a72c0c09685525c9d1eace79e8d75 (patch) | |
tree | cf3ddeedc5170a9233e6d8ec2ff8affa762ab696 /activerecord/lib/active_record | |
parent | ddefdd70860f68545a6e4195b184a26a1303f517 (diff) | |
parent | bfb9b7165ef4cb18835f65be600778bd8b1d6d11 (diff) | |
download | rails-19ecde00ff8a72c0c09685525c9d1eace79e8d75.tar.gz rails-19ecde00ff8a72c0c09685525c9d1eace79e8d75.tar.bz2 rails-19ecde00ff8a72c0c09685525c9d1eace79e8d75.zip |
Merge pull request #5720 from kennyj/should_use_klass_method
Get a properly aliased_table_name, when we use a polymorphic association.
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/associations/association.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations/association.rb b/activerecord/lib/active_record/associations/association.rb index fb0ca15c23..3c41a303d3 100644 --- a/activerecord/lib/active_record/associations/association.rb +++ b/activerecord/lib/active_record/associations/association.rb @@ -39,7 +39,7 @@ module ActiveRecord # post.comments.aliased_table_name # => "comments" # def aliased_table_name - reflection.klass.table_name + klass.table_name end # Resets the \loaded flag to +false+ and sets the \target to +nil+. |