Module: PufferPages::Extensions::Pagenator

Extended by:
ActiveSupport::Concern
Defined in:
lib/puffer_pages/extensions/pagenator.rb

Overview

There is no error in module name

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#_normalize_options(options) ⇒ Object



25
26
27
28
29
30
31
32
33
# File 'lib/puffer_pages/extensions/pagenator.rb', line 25

def _normalize_options options
  super
  if options[:puffer_page] || (options[:puffer_page] != false && _puffer_pages_action?)
    scope = options[:puffer_scope].presence || _puffer_pages_options[:scope].presence
    page = options.values_at(:puffer_page, :partial, :action, :file).delete_if(&:blank?).first
    options[:puffer_page] = _puffer_pages_template(page, scope)
    options[:layout] = 'puffer_page'
  end
end