diff options
| author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-12-14 15:27:06 -0800 | 
|---|---|---|
| committer | Vijay Dev <vijaydev.cse@gmail.com> | 2010-12-16 01:49:29 +0530 | 
| commit | a64bf22a718bcc8d1a33234ab8a7cdd91c6d537b (patch) | |
| tree | 5a34a29a00a450e79cb31fd782ad5bfc2ebcd333 | |
| parent | 2f0708e97405fa55e641dd2eac8805f12f878f5a (diff) | |
| download | rails-a64bf22a718bcc8d1a33234ab8a7cdd91c6d537b.tar.gz rails-a64bf22a718bcc8d1a33234ab8a7cdd91c6d537b.tar.bz2 rails-a64bf22a718bcc8d1a33234ab8a7cdd91c6d537b.zip | |
class names are already strings, so we do not need to call to_s on the strings that are already strings
| -rw-r--r-- | activerecord/lib/active_record/associations/through_association_scope.rb | 4 | 
1 files changed, 2 insertions, 2 deletions
| diff --git a/activerecord/lib/active_record/associations/through_association_scope.rb b/activerecord/lib/active_record/associations/through_association_scope.rb index 8d701248af..6b7faa9fc3 100644 --- a/activerecord/lib/active_record/associations/through_association_scope.rb +++ b/activerecord/lib/active_record/associations/through_association_scope.rb @@ -88,7 +88,7 @@ module ActiveRecord        def construct_owner_attributes(reflection)          if as = reflection.options[:as]            { "#{as}_id" => @owner.id, -            "#{as}_type" => @owner.class.base_class.name.to_s } +            "#{as}_type" => @owner.class.base_class.name }          else            { reflection.primary_key_name => @owner.id }          end @@ -102,7 +102,7 @@ module ActiveRecord          join_attributes = construct_owner_attributes(@reflection.through_reflection).merge(@reflection.source_reflection.primary_key_name => associate.id)          if @reflection.options[:source_type] -          join_attributes.merge!(@reflection.source_reflection.options[:foreign_type] => associate.class.base_class.name.to_s) +          join_attributes.merge!(@reflection.source_reflection.options[:foreign_type] => associate.class.base_class.name)          end          if @reflection.through_reflection.options[:conditions].is_a?(Hash) | 
