Class: Adminpanel::ApplicationController

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

Instance Method Summary collapse

Methods included from RouterHelper

#adminpanel_resources, #default_controllers, #find_resources, #menu_items, #resources_path

Methods included from RestActionsHelper

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

Methods included from SessionsHelper

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

Instance Method Details

#get_menu_elementsObject



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

def get_menu_elements
    @menu_items = menu_items
end

#handle_unverified_requestObject



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

def handle_unverified_request
    sign_out
    super
end

#set_modelObject



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

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

#signed_in_userObject



16
17
18
# File 'app/controllers/adminpanel/application_controller.rb', line 16

def signed_in_user
    redirect_to , :notice => "Favor de Iniciar sesion" unless signed_in?
end