Class: Rql::Scope::ParamMethods
Instance Method Summary
collapse
Methods inherited from MethodGroup
#initialize, #scope
Instance Method Details
#includes(*attributes) ⇒ Object
20
21
22
|
# File 'lib/rql/scope/param_methods.rb', line 20
def includes(*attributes)
scope.includes(*attributes)
end
|
#joins(*attributes) ⇒ Object
16
17
18
|
# File 'lib/rql/scope/param_methods.rb', line 16
def joins(*attributes)
scope.joins(*attributes)
end
|
#order(*attributes) ⇒ Object
12
13
14
|
# File 'lib/rql/scope/param_methods.rb', line 12
def order(*attributes)
scope.order(*build_order(attributes))
end
|
#select(*attributes) ⇒ Object
8
9
10
|
# File 'lib/rql/scope/param_methods.rb', line 8
def select(*attributes)
scope.select(*attributes.map{|attr| scope.derived_attributes[attr] ? scope.eval_rql(&scope.derived_attributes[attr]).as(attr).arel : attr})
end
|
#where(**conditions) ⇒ Object
4
5
6
|
# File 'lib/rql/scope/param_methods.rb', line 4
def where(**conditions)
scope.where(build_conditions(conditions))
end
|