diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2018-01-15 03:19:23 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2018-01-15 03:19:54 +0900 |
commit | 282668cc81ba153ed83820a5f544fea6907b504d (patch) | |
tree | 85251aa1dec3ce6a4d5b669a5aff41620acc5903 /activerecord/lib | |
parent | 7b4132f4a28d1c264a972b95bf86bf6230869a40 (diff) | |
parent | f3d69c005291591220875efc48f82ea3909c6625 (diff) | |
download | rails-282668cc81ba153ed83820a5f544fea6907b504d.tar.gz rails-282668cc81ba153ed83820a5f544fea6907b504d.tar.bz2 rails-282668cc81ba153ed83820a5f544fea6907b504d.zip |
Merge pull request #28313 from sandrew/master
Allow unscoping of left_outer_joins
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/relation/query_methods.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/relation/query_methods.rb b/activerecord/lib/active_record/relation/query_methods.rb index 29829cd8a0..0f02096593 100644 --- a/activerecord/lib/active_record/relation/query_methods.rb +++ b/activerecord/lib/active_record/relation/query_methods.rb @@ -327,8 +327,8 @@ module ActiveRecord end VALID_UNSCOPING_VALUES = Set.new([:where, :select, :group, :order, :lock, - :limit, :offset, :joins, :includes, :from, - :readonly, :having]) + :limit, :offset, :joins, :left_outer_joins, + :includes, :from, :readonly, :having]) # Removes an unwanted relation that is already defined on a chain of relations. # This is useful when passing around chains of relations and would like to @@ -375,6 +375,7 @@ module ActiveRecord args.each do |scope| case scope when Symbol + scope = :left_outer_joins if scope == :left_joins if !VALID_UNSCOPING_VALUES.include?(scope) raise ArgumentError, "Called unscope() with invalid unscoping argument ':#{scope}'. Valid arguments are :#{VALID_UNSCOPING_VALUES.to_a.join(", :")}." end |