Resting Pug logo Resting Pug

Description

Creates a chain of methods for creating a subject

Tip

Override this method to add or remove methods executed while creating a subject

Used in

Use

Example

class BooksController < ApplicationController
  include RestingPug::Base

  private
  # Override a create chain adding logging to the end
  def create_chain
    super + [:log_creating_subject]
  end
end

Source code

# lib/resting_pug/chains.rb

def create_chain
  [:create_subject, :decide_what_to_render]
end
Find me on GitHub