From f916aa247bddba0c58c50822886bc29e8556df76 Mon Sep 17 00:00:00 2001 From: Sean Griffin Date: Mon, 29 Dec 2014 11:21:56 -0700 Subject: 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. --- activerecord/test/cases/scoping/default_scoping_test.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'activerecord/test/cases/scoping/default_scoping_test.rb') diff --git a/activerecord/test/cases/scoping/default_scoping_test.rb b/activerecord/test/cases/scoping/default_scoping_test.rb index d56f998622..0738df1b54 100644 --- a/activerecord/test/cases/scoping/default_scoping_test.rb +++ b/activerecord/test/cases/scoping/default_scoping_test.rb @@ -145,13 +145,11 @@ class DefaultScopingTest < ActiveRecord::TestCase assert_equal expected_5, received_5 expected_6 = Developer.order('salary DESC').collect(&:name) - # FIXME: Remove the Arel::Nodes::Quoted in Rails 5.1 - received_6 = DeveloperOrderedBySalary.where(Developer.arel_table['name'].eq(Arel::Nodes::Quoted.new('David'))).unscope(where: :name).collect(&:name) + received_6 = DeveloperOrderedBySalary.where(Developer.arel_table['name'].eq('David')).unscope(where: :name).collect(&:name) assert_equal expected_6, received_6 expected_7 = Developer.order('salary DESC').collect(&:name) - # FIXME: Remove the Arel::Nodes::Quoted in Rails 5.1 - received_7 = DeveloperOrderedBySalary.where(Developer.arel_table[:name].eq(Arel::Nodes::Quoted.new('David'))).unscope(where: :name).collect(&:name) + received_7 = DeveloperOrderedBySalary.where(Developer.arel_table[:name].eq('David')).unscope(where: :name).collect(&:name) assert_equal expected_7, received_7 end -- cgit v1.2.3