diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2010-01-02 13:43:50 +0530 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2010-01-02 13:43:50 +0530 |
commit | 7ff131f740d10cad767ab1200f9d089055806090 (patch) | |
tree | d434d417df7c62d75bd4100b1afb99cf3170689b /activerecord/lib/active_record/relation/query_methods.rb | |
parent | abae712213f663b447d49e9b06001cf51e3b5811 (diff) | |
download | rails-7ff131f740d10cad767ab1200f9d089055806090.tar.gz rails-7ff131f740d10cad767ab1200f9d089055806090.tar.bz2 rails-7ff131f740d10cad767ab1200f9d089055806090.zip |
Make sure not to spalt string arguments
Diffstat (limited to 'activerecord/lib/active_record/relation/query_methods.rb')
-rw-r--r-- | activerecord/lib/active_record/relation/query_methods.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/relation/query_methods.rb b/activerecord/lib/active_record/relation/query_methods.rb index 432b33e174..4600aab574 100644 --- a/activerecord/lib/active_record/relation/query_methods.rb +++ b/activerecord/lib/active_record/relation/query_methods.rb @@ -116,7 +116,7 @@ module ActiveRecord args.first end - spawn(@relation.where(*conditions)) + conditions.is_a?(String) ? spawn(@relation.where(conditions)) : spawn(@relation.where(*conditions)) end private |