Class: Adminpanel::ApplicationController

Inherits:
ActionController::Base
  • Object
show all
Includes:
RestActionsHelper, SessionsHelper
Defined in:
app/controllers/adminpanel/application_controller.rb

Instance Method Summary collapse

Methods included from RestActionsHelper

#create, #destroy, #edit, #index, #move_better, #move_worst, #new, #show, #update

Methods included from SessionsHelper

#current_user, #current_user=, #sign_in, #sign_out, #signed_in?

Instance Method Details

#handle_unverified_request ⇒ Object



27
28
29
30
# File 'app/controllers/adminpanel/application_controller.rb', line 27

def handle_unverified_request
    sign_out
    super
end

#set_model ⇒ Object



23
24
25
# File 'app/controllers/adminpanel/application_controller.rb', line 23

def set_model
    @model = params[:controller].classify.constantize
end

#signed_in_user ⇒ Object



19
20
21
# File 'app/controllers/adminpanel/application_controller.rb', line 19

def signed_in_user
    redirect_to , :notice => I18n.t("authentication.welcome") unless signed_in?
end