aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/relation/query_methods.rb
diff options
context:
space:
mode:
authorSean Griffin <sean@seantheprogrammer.com>2015-10-16 09:50:49 -0700
committerSean Griffin <sean@seantheprogrammer.com>2015-10-16 09:51:47 -0700
commit4d8f62dcfa0a5157b3facbd71f75fc6639636347 (patch)
tree3459041084d61b881b8cd33715989ecf21fe0ef6 /activerecord/lib/active_record/relation/query_methods.rb
parent833aef438dab57c2c6523686fa9754faa023cd10 (diff)
downloadrails-4d8f62dcfa0a5157b3facbd71f75fc6639636347.tar.gz
rails-4d8f62dcfa0a5157b3facbd71f75fc6639636347.tar.bz2
rails-4d8f62dcfa0a5157b3facbd71f75fc6639636347.zip
Move the handling of supported arguments to `where`
`WhereClauseFactory` handles all other branches based on argument types, so the code fits more naturally here, and it's just where the responsibility belongs.
Diffstat (limited to 'activerecord/lib/active_record/relation/query_methods.rb')
-rw-r--r--activerecord/lib/active_record/relation/query_methods.rb2
1 files changed, 0 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/relation/query_methods.rb b/activerecord/lib/active_record/relation/query_methods.rb
index 0dcecbd42d..55fd0e0b52 100644
--- a/activerecord/lib/active_record/relation/query_methods.rb
+++ b/activerecord/lib/active_record/relation/query_methods.rb
@@ -552,8 +552,6 @@ module ActiveRecord
WhereChain.new(spawn)
elsif opts.blank?
self
- elsif !opts.is_a?(String) && !opts.respond_to?(:to_h)
- raise ArgumentError, "Unsupported argument type: #{opts} (#{opts.class})"
else
spawn.where!(opts, *rest)
end