Module: Admin::ListController::Callbacks::ClassMethods

Defined in:
app/controllers/admin/list_controller.rb

Overview

Class methods for callbacks.

Instance Method Summary collapse

Instance Method Details

#define_render_callbacks(*actions) ⇒ Object

Defines before callbacks for the render actions.


135
136
137
138
139
140
# File 'app/controllers/admin/list_controller.rb', line 135

def define_render_callbacks(*actions)
  args = actions.map { |a| :"render_#{a}" }
  args << { only: :before,
            terminator: callback_terminator }
  define_model_callbacks(*args)
end