Module: Cruddy::Controller

Defined in:
lib/cruddy/controller.rb

Defined Under Namespace

Modules: ClassMethods, InstanceMethods

Class Method Summary collapse

Class Method Details

.included(receiver) ⇒ Object



164
165
166
167
168
169
# File 'lib/cruddy/controller.rb', line 164

def self.included(receiver)
  receiver.extend         ClassMethods
  receiver.send :include, InstanceMethods
  receiver.before_action :load_resource_instance, only: [:show, :edit, :update, :destroy]
  receiver.before_action :load_resource_collection, only: [:index]
end