Module: UnlockGateway::Controller

Defined in:
lib/unlock_gateway/controller.rb

Overview

This module will be extended (ClassMethods) and included by is_unlock_gateway on controllers

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#activateObject

This action will be used when the user requests to activate/reactivate a contribution



31
32
33
# File 'lib/unlock_gateway/controller.rb', line 31

def activate
  transition_state(:active)
end

#editObject

A second step or final checkout should use this action



26
27
28
# File 'lib/unlock_gateway/controller.rb', line 26

def edit
  authorize @contribution
end

#suspendObject

This action will be used when the user requests to suspend a contribution



36
37
38
# File 'lib/unlock_gateway/controller.rb', line 36

def suspend
  transition_state(:suspended)
end