diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2009-12-28 12:12:53 -0800 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2009-12-28 12:12:53 -0800 |
commit | ea7b5ff99e44aac0fc643e02dc4d046ab99ecdc7 (patch) | |
tree | faccc111ac4de4e5e1b35cff17efa93797f244c9 /activerecord/lib | |
parent | f95fcdd3af95c4819322e00100831f12f95a8e62 (diff) | |
download | rails-ea7b5ff99e44aac0fc643e02dc4d046ab99ecdc7.tar.gz rails-ea7b5ff99e44aac0fc643e02dc4d046ab99ecdc7.tar.bz2 rails-ea7b5ff99e44aac0fc643e02dc4d046ab99ecdc7.zip |
Use present rather than any
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/relation.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/relation.rb b/activerecord/lib/active_record/relation.rb index c7a74b7763..cb743358b2 100644 --- a/activerecord/lib/active_record/relation.rb +++ b/activerecord/lib/active_record/relation.rb @@ -25,7 +25,7 @@ module ActiveRecord select(r.send(:select_clauses).join(', ')). eager_load(r.eager_load_associations). preload(r.associations_to_preload). - from(r.send(:sources).any? ? r.send(:from_clauses) : nil) + from(r.send(:sources).present? ? r.send(:from_clauses) : nil) end alias :& :merge @@ -158,7 +158,7 @@ module ActiveRecord :conditions => where_clause, :limit => @relation.taken, :offset => @relation.skipped, - :from => (@relation.send(:from_clauses) if @relation.send(:sources).any?) + :from => (@relation.send(:from_clauses) if @relation.send(:sources).present?) }, ActiveRecord::Associations::ClassMethods::JoinDependency.new(@klass, @eager_load_associations, nil)) end |