Module: PagedScopes::Context
- Extended by:
- ActiveSupport::Memoizable
- Defined in:
- lib/paged_scopes/context.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
5 6 7 8 9 10 |
# File 'lib/paged_scopes/context.rb', line 5 def self.included(base) base.extend ClassMethods class << base alias_method_chain :find, :context end end |
Instance Method Details
#next ⇒ Object
28 29 30 |
# File 'lib/paged_scopes/context.rb', line 28 def next self.class.scoped(@found_scope).scoped(@found_options).after(self) end |
#previous ⇒ Object
24 25 26 |
# File 'lib/paged_scopes/context.rb', line 24 def previous self.class.scoped(@found_scope).scoped(@found_options).before(self) end |