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
- Subject#fetch_subjects
- Modificators#filter_subjects
- Modificators#sort_subjects
- Modificators#paginate_subjects
- Render#render_subjects
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