Resting Pug logo Resting Pug

Description

Creates a chain of methods for updating a subject

Tip

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

Used in

Use

Example

class BooksController < ApplicationController
  include RestingPug::Base

  private
  # Override an update chain adding logging to the end
  def update_chain
    super + [:log_updating_subject]
  end
end

Source code

# lib/resting_pug/chains.rb

def update_chain
  [:fetch_subject, :update_subject, :decide_what_to_render]
end
Find me on GitHub