diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-12-22 18:02:49 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-12-22 18:23:37 -0800 |
commit | 2de9b858a09e735fa4e7705e929f945947e68dae (patch) | |
tree | 38ab7c9d5872de020eec11c3d1a86ea67ded45bc /activerecord | |
parent | 186a1b11449a2b94030791b2c778a76b07bb099f (diff) | |
download | rails-2de9b858a09e735fa4e7705e929f945947e68dae.tar.gz rails-2de9b858a09e735fa4e7705e929f945947e68dae.tar.bz2 rails-2de9b858a09e735fa4e7705e929f945947e68dae.zip |
to_sym stuff before passing it to arel
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/base.rb | 2 | ||||
-rw-r--r-- | activerecord/lib/active_record/relation/predicate_builder.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index 858ccebbfa..6aac25ba9b 100644 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -913,7 +913,7 @@ module ActiveRecord #:nodoc: end def type_condition - sti_column = arel_table[inheritance_column] + sti_column = arel_table[inheritance_column.to_sym] condition = sti_column.eq(sti_name) descendants.each { |subclass| condition = condition.or(sti_column.eq(subclass.sti_name)) } diff --git a/activerecord/lib/active_record/relation/predicate_builder.rb b/activerecord/lib/active_record/relation/predicate_builder.rb index 70d84619a1..d748eebc41 100644 --- a/activerecord/lib/active_record/relation/predicate_builder.rb +++ b/activerecord/lib/active_record/relation/predicate_builder.rb @@ -15,7 +15,7 @@ module ActiveRecord table = Arel::Table.new(table_name, :engine => engine) end - attribute = table[column] || Arel::Attribute.new(table, column) + attribute = table[column.to_sym] || Arel::Attribute.new(table, column) case value when Array, ActiveRecord::Associations::AssociationCollection, ActiveRecord::Relation |