Method: Ransack::Context#chain_scope
- Defined in:
- lib/ransack/context.rb
#chain_scope(scope, args) ⇒ Object
47 48 49 50 51 52 53 54 |
# File 'lib/ransack/context.rb', line 47 def chain_scope(scope, args) return unless @klass.method(scope) && args != false @object = if scope_arity(scope) < 1 && args == true @object.public_send(scope) else @object.public_send(scope, *args) end end |