Module: UnlockGateway::Controller::ClassMethods

Defined in:
lib/unlock_gateway/controller.rb

Class Method Summary collapse

Class Method Details

.extended(base) ⇒ Object

This will be executed first, to set the controller up. Then the instance methods will be included



9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/unlock_gateway/controller.rb', line 9

def self.extended(base)
  base.class_eval do

    before_action :set_contribution, only: %i[edit activate suspend]

    respond_to :html

    after_action :verify_authorized
    after_action :verify_policy_scoped, only: %i[]
    before_action :authenticate_user!, only: %i[edit]

  end
end