diff options
author | rick <technoweenie@gmail.com> | 2008-05-31 17:13:11 -0700 |
---|---|---|
committer | rick <technoweenie@gmail.com> | 2008-05-31 17:13:11 -0700 |
commit | 72483c0d4c1e4ea794919974100acc2f255f6fd2 (patch) | |
tree | 1519e9e4dd95c3c0ac13e1d0bf8bc0e2b15fc5a9 /activerecord/lib/active_record/associations | |
parent | a6e79083273dfb1a62aa8ff02db07454c65729ff (diff) | |
download | rails-72483c0d4c1e4ea794919974100acc2f255f6fd2.tar.gz rails-72483c0d4c1e4ea794919974100acc2f255f6fd2.tar.bz2 rails-72483c0d4c1e4ea794919974100acc2f255f6fd2.zip |
Add ActiveRecord::Base.sti_name that checks ActiveRecord::Base#store_full_sti_class? and returns either the full or demodulized name. [rick] [#114 state:resolved]
Diffstat (limited to 'activerecord/lib/active_record/associations')
-rw-r--r-- | activerecord/lib/active_record/associations/has_many_through_association.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations/has_many_through_association.rb b/activerecord/lib/active_record/associations/has_many_through_association.rb index ebcf462f2e..52ced36d16 100644 --- a/activerecord/lib/active_record/associations/has_many_through_association.rb +++ b/activerecord/lib/active_record/associations/has_many_through_association.rb @@ -237,7 +237,7 @@ module ActiveRecord end def build_sti_condition - "#{@reflection.through_reflection.quoted_table_name}.#{@reflection.through_reflection.klass.inheritance_column} = #{@reflection.klass.quote_value(@reflection.through_reflection.klass.name.demodulize)}" + "#{@reflection.through_reflection.quoted_table_name}.#{@reflection.through_reflection.klass.inheritance_column} = #{@reflection.klass.quote_value(@reflection.through_reflection.klass.sti_name)}" end alias_method :sql_conditions, :conditions |