Class: UnlocksController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- UnlocksController
- Defined in:
- app/controllers/unlocks_controller.rb
Instance Method Summary collapse
-
#show ⇒ Object
GET /resource/unlock?unlock_token=abcdef.
Methods included from Devise::Controllers::Common
Methods included from Devise::Controllers::InternalHelpers
#devise_controller?, #devise_mapping, included, #resource, #resource_class, #resource_name
Instance Method Details
#show ⇒ Object
GET /resource/unlock?unlock_token=abcdef
6 7 8 9 10 11 12 13 14 15 |
# File 'app/controllers/unlocks_controller.rb', line 6 def show self.resource = resource_class.unlock!(:unlock_token => params[:unlock_token]) if resource.errors.empty? :notice, :unlocked sign_in_and_redirect(resource_name, resource) else render_with_scope :new end end |