aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/querying.rb
diff options
context:
space:
mode:
authorMatthew Draper <matthew@trebex.net>2014-06-23 11:42:46 +0800
committerSean Griffin <sean@thoughtbot.com>2015-01-28 13:35:55 -0700
commitb0b37942d729b6bdcd2e3178eda7fa1de203b3d0 (patch)
treecbf5e9fe861b6093166213b322e3d5f6bf0c8156 /activerecord/lib/active_record/querying.rb
parent56a3d5ec9183a9bcbf140d4102d45e3928f2617a (diff)
downloadrails-b0b37942d729b6bdcd2e3178eda7fa1de203b3d0.tar.gz
rails-b0b37942d729b6bdcd2e3178eda7fa1de203b3d0.tar.bz2
rails-b0b37942d729b6bdcd2e3178eda7fa1de203b3d0.zip
Added #or to ActiveRecord::Relation
Post.where('id = 1').or(Post.where('id = 2')) # => SELECT * FROM posts WHERE (id = 1) OR (id = 2) [Matthew Draper & Gael Muller]
Diffstat (limited to 'activerecord/lib/active_record/querying.rb')
-rw-r--r--activerecord/lib/active_record/querying.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/querying.rb b/activerecord/lib/active_record/querying.rb
index 91c9a0db99..4e597590e9 100644
--- a/activerecord/lib/active_record/querying.rb
+++ b/activerecord/lib/active_record/querying.rb
@@ -7,7 +7,7 @@ module ActiveRecord
delegate :find_by, :find_by!, to: :all
delegate :destroy, :destroy_all, :delete, :delete_all, :update, :update_all, to: :all
delegate :find_each, :find_in_batches, to: :all
- delegate :select, :group, :order, :except, :reorder, :limit, :offset, :joins,
+ delegate :select, :group, :order, :except, :reorder, :limit, :offset, :joins, :or,
:where, :rewhere, :preload, :eager_load, :includes, :from, :lock, :readonly,
:having, :create_with, :uniq, :distinct, :references, :none, :unscope, to: :all
delegate :count, :average, :minimum, :maximum, :sum, :calculate, to: :all