Module: PufferPages::Extensions::Pagenator::ClassMethods

Defined in:
lib/puffer_pages/extensions/pagenator.rb

Instance Method Summary collapse

Instance Method Details

#inherited(klass) ⇒ Object



12
13
14
15
# File 'lib/puffer_pages/extensions/pagenator.rb', line 12

def inherited(klass)
  super
  klass._puffer_pages_options = _puffer_pages_options.dup
end

#puffer_pages(options = {}) ⇒ Object



17
18
19
20
21
22
# File 'lib/puffer_pages/extensions/pagenator.rb', line 17

def puffer_pages options = {}
  _puffer_pages_options[:pagenated] = true
  _puffer_pages_options[:only] = Array.wrap(options[:only]).map(&:to_s).presence
  _puffer_pages_options[:except] = Array.wrap(options[:except]).map(&:to_s).presence
  _puffer_pages_options[:scope] = options[:scope]
end