Class: Devise::DisplayqrController

Inherits:
DeviseController
  • Object
show all
Includes:
Controllers::Helpers
Defined in:
app/controllers/devise/displayqr_controller.rb

Instance Method Summary collapse

Instance Method Details

#showObject



6
7
8
9
10
11
12
13
# File 'app/controllers/devise/displayqr_controller.rb', line 6

def show
  if resource.nil? || resource.gauth_secret.nil?
     scope, resource, :bypass => true
    redirect_to stored_location_for(scope) || :root
  else
    render :show
  end
end

#updateObject



15
16
17
18
19
20
21
22
23
# File 'app/controllers/devise/displayqr_controller.rb', line 15

def update
  if resource.set_gauth_enabled(resource_params)
    set_flash_message :notice, "Status Updated!"
     scope, resource, :bypass => true
    redirect_to stored_location_for(scope) || :root
  else
    render :show
  end
end