Module: Rescoped::QueryMethods
- Defined in:
- lib/rescoped/query_methods.rb
Overview
:nodoc:
Constant Summary collapse
- SUPPORTED_QUERY_METHODS =
%i[joins left_outer_joins includes].freeze
Instance Method Summary collapse
-
#remove_includes(*args) ⇒ ActiveRecord::Relation
Removes any number of eager loaded relations in scope.
-
#remove_joins(*args) ⇒ ActiveRecord::Relation
Removes any number of joins relations in scope.
-
#remove_left_outer_joins(*args) ⇒ ActiveRecord::Relation
Removes any number of left outer joins relations in scope.
Instance Method Details
#remove_includes(*args) ⇒ ActiveRecord::Relation
Removes any number of eager loaded relations in scope
34 35 36 37 38 |
# File 'lib/rescoped/query_methods.rb', line 34 SUPPORTED_QUERY_METHODS.each do |name| define_method("remove_#{name}") do |*args| rescoped(query_method: name, relations: args) end end |
#remove_joins(*args) ⇒ ActiveRecord::Relation
Removes any number of joins relations in scope
|
# File 'lib/rescoped/query_methods.rb', line 10
|
#remove_left_outer_joins(*args) ⇒ ActiveRecord::Relation
Removes any number of left outer joins relations in scope
|
# File 'lib/rescoped/query_methods.rb', line 18
|