aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/null_relation.rb
diff options
context:
space:
mode:
authorSean Griffin <sean@thoughtbot.com>2015-01-28 15:21:23 -0700
committerSean Griffin <sean@thoughtbot.com>2015-01-28 15:21:23 -0700
commit9e42cf019f2417473e7dcbfcb885709fa2709f89 (patch)
tree9e8848ac512b875435f358e2db1399b1d2e584cb /activerecord/lib/active_record/null_relation.rb
parent96ac14a3856b9e48e11c7f1e0552ef2f3a87e4d6 (diff)
parentff45b9e9f7c4ff0fb4fdab8beb539913b876d63b (diff)
downloadrails-9e42cf019f2417473e7dcbfcb885709fa2709f89.tar.gz
rails-9e42cf019f2417473e7dcbfcb885709fa2709f89.tar.bz2
rails-9e42cf019f2417473e7dcbfcb885709fa2709f89.zip
Merge Pull Request #16052 Added #or to ActiveRecord::Relation
Diffstat (limited to 'activerecord/lib/active_record/null_relation.rb')
-rw-r--r--activerecord/lib/active_record/null_relation.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/null_relation.rb b/activerecord/lib/active_record/null_relation.rb
index b406da14dc..63ca29305d 100644
--- a/activerecord/lib/active_record/null_relation.rb
+++ b/activerecord/lib/active_record/null_relation.rb
@@ -75,5 +75,9 @@ module ActiveRecord
def exists?(_id = false)
false
end
+
+ def or(other)
+ other.spawn
+ end
end
end