diff options
author | Jon Leighton <j@jonathanleighton.com> | 2011-09-29 17:59:40 +0100 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2011-09-29 18:00:30 +0100 |
commit | adb8ac153f8e9e497eaecf62165c0bd53c18149a (patch) | |
tree | 6dc889f21b62a83f55653a7acc9fe84205850cc3 /activerecord/test | |
parent | 4284e137ab876927b15d593358a157fe077ec238 (diff) | |
download | rails-adb8ac153f8e9e497eaecf62165c0bd53c18149a.tar.gz rails-adb8ac153f8e9e497eaecf62165c0bd53c18149a.tar.bz2 rails-adb8ac153f8e9e497eaecf62165c0bd53c18149a.zip |
Don't call self.class unless necessary. Closes #3171.
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/reflection_test.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/test/cases/reflection_test.rb b/activerecord/test/cases/reflection_test.rb index 0a48f418b1..ca9d88fbd5 100644 --- a/activerecord/test/cases/reflection_test.rb +++ b/activerecord/test/cases/reflection_test.rb @@ -244,6 +244,7 @@ class ReflectionTest < ActiveRecord::TestCase # Normal association assert_equal "id", Author.reflect_on_association(:posts).association_primary_key.to_s assert_equal "name", Author.reflect_on_association(:essay).association_primary_key.to_s + assert_equal "name", Essay.reflect_on_association(:writer).association_primary_key.to_s # Through association (uses the :primary_key option from the source reflection) assert_equal "nick", Author.reflect_on_association(:subscribers).association_primary_key.to_s |