Resting Pug logo Resting Pug

Description

Creates a chain of methods for showing a list of subjects

Tip

Override this method to add or remove methods executed while showing a list of subjects

Used in

Use

Example

class BooksController < ApplicationController
  include RestingPug::Base

  private
  # Override an index chain adding logging to the end
  def index_chain
    super + [:log_indexing_subjects]
  end
end

Source code

# lib/resting_pug/chains.rb

def index_chain
  [:fetch_subjects, :filter_subjects, :sort_subjects, :paginate_subjects, :render_subjects]
end
Find me on GitHub