Module: RestingPug::Base

Defined in:
lib/resting_pug/base.rb

Overview

Main module

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object

Includes all methods in controller

Parameters:

  • base (ActionController::Base)

15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/resting_pug/base.rb', line 15

def self.included(base)
  base.class_eval do
    include RestingPug::Actions
    include RestingPug::Chains
    include RestingPug::Render
    include RestingPug::Subject
    include RestingPug::Params
    include RestingPug::Modificators

    rescue_from ActionController::ParameterMissing, with: :render_param_missing
    rescue_from ActiveRecord::RecordNotFound, with: :render_not_found
  end
end