Module: PagedScopes::Context::ClassMethods
- Defined in:
- lib/paged_scopes/context.rb
Instance Method Summary collapse
Instance Method Details
#find_with_context(*args) ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/paged_scopes/context.rb', line 13 def find_with_context(*args) found_scope, = (scope(:find) || {}).dup, args.dup..dup returning find_without_context(*args) do |results| [ results ].flatten.compact.each do |result| result.instance_variable_set "@found_scope", found_scope.dup result.instance_variable_set "@found_options", .dup end end end |