aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
authorSean Griffin <sean@seantheprogrammer.com>2015-10-30 14:05:11 -0600
committerSean Griffin <sean@seantheprogrammer.com>2015-10-30 14:05:11 -0600
commitd2315d0c3b1ede89b7cce6a77c647285359243c5 (patch)
tree3e47122c3b73dc483fd6e873c96d62ea06ab68f9 /activerecord/lib/active_record
parentd52baa851480ca79d60333187cd0dab9338b7c5f (diff)
parentd3411ad361bf1d02b1f9e1724c1298e7de3670ea (diff)
downloadrails-d2315d0c3b1ede89b7cce6a77c647285359243c5.tar.gz
rails-d2315d0c3b1ede89b7cce6a77c647285359243c5.tar.bz2
rails-d2315d0c3b1ede89b7cce6a77c647285359243c5.zip
Merge pull request #22125 from k0kubun/left_joins
Alias left_joins to left_outer_joins
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r--activerecord/lib/active_record/querying.rb2
-rw-r--r--activerecord/lib/active_record/relation.rb2
-rw-r--r--activerecord/lib/active_record/relation/query_methods.rb2
3 files changed, 4 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/querying.rb b/activerecord/lib/active_record/querying.rb
index 7ab2108de0..1f429cfd94 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, :in_batches, to: :all
- delegate :select, :group, :order, :except, :reorder, :limit, :offset, :joins, :left_outer_joins, :or,
+ delegate :select, :group, :order, :except, :reorder, :limit, :offset, :joins, :left_joins, :left_outer_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
diff --git a/activerecord/lib/active_record/relation.rb b/activerecord/lib/active_record/relation.rb
index ad7ea199d6..f100476374 100644
--- a/activerecord/lib/active_record/relation.rb
+++ b/activerecord/lib/active_record/relation.rb
@@ -4,7 +4,7 @@ module ActiveRecord
# = Active Record \Relation
class Relation
MULTI_VALUE_METHODS = [:includes, :eager_load, :preload, :select, :group,
- :order, :joins, :left_outer_joins, :references,
+ :order, :joins, :left_joins, :left_outer_joins, :references,
:extending, :unscope]
SINGLE_VALUE_METHODS = [:limit, :offset, :lock, :readonly, :reordering,
diff --git a/activerecord/lib/active_record/relation/query_methods.rb b/activerecord/lib/active_record/relation/query_methods.rb
index 27e7948b10..800de78fe3 100644
--- a/activerecord/lib/active_record/relation/query_methods.rb
+++ b/activerecord/lib/active_record/relation/query_methods.rb
@@ -441,11 +441,13 @@ module ActiveRecord
spawn.left_outer_joins!(*args)
end
+ alias :left_joins :left_outer_joins
def left_outer_joins!(*args) # :nodoc:
self.left_outer_joins_values += args
self
end
+ alias :left_joins! :left_outer_joins!
# Returns a new relation, which is the result of filtering the current relation
# according to the conditions in the arguments.