aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/inheritance.rb
diff options
context:
space:
mode:
authorSean Griffin <sean@thoughtbot.com>2014-12-29 11:21:56 -0700
committerSean Griffin <sean@thoughtbot.com>2014-12-29 11:21:56 -0700
commitf916aa247bddba0c58c50822886bc29e8556df76 (patch)
treed27270ccdebfcb74efe073e8a9785238f090f155 /activerecord/lib/active_record/inheritance.rb
parent7931c96338353adc0ebfc780769ef3cd06ab0d79 (diff)
downloadrails-f916aa247bddba0c58c50822886bc29e8556df76.tar.gz
rails-f916aa247bddba0c58c50822886bc29e8556df76.tar.bz2
rails-f916aa247bddba0c58c50822886bc29e8556df76.zip
Remove all cases of manuallly wrapping `Arel::Nodes::Quoted`
This is no longer required now that we are injecting a type caster object into the Arel table, with the exception of uniqueness validations. Since it calls `ConnectionAdapter#type_cast`, the value has already been cast for the database. We don't want Arel to attempt to cast it further, so we need to continue wrapping it in a quoted node. This can potentially go away when this validator is refactored to make better use of `where` or the predicate builder.
Diffstat (limited to 'activerecord/lib/active_record/inheritance.rb')
-rw-r--r--activerecord/lib/active_record/inheritance.rb1
1 files changed, 0 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/inheritance.rb b/activerecord/lib/active_record/inheritance.rb
index 8a532402ba..b91e9ac137 100644
--- a/activerecord/lib/active_record/inheritance.rb
+++ b/activerecord/lib/active_record/inheritance.rb
@@ -193,7 +193,6 @@ module ActiveRecord
def type_condition(table = arel_table)
sti_column = table[inheritance_column]
sti_names = ([self] + descendants).map(&:sti_name)
- sti_names.map! { |v| Arel::Nodes::Quoted.new(v) } # FIXME: Remove this when type casting in Arel is removed (5.1)
sti_column.in(sti_names)
end