Class: Adminpanel::ApplicationController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- Adminpanel::ApplicationController
- Includes:
- RestActionsHelper, RouterHelper, SessionsHelper
- Defined in:
- app/controllers/adminpanel/application_controller.rb
Direct Known Subclasses
GalleriesController, SectionsController, SessionsController, UsersController
Instance Method Summary collapse
- #get_menu_elements ⇒ Object
- #handle_unverified_request ⇒ Object
- #set_model ⇒ Object
- #signed_in_user ⇒ Object
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_elements ⇒ Object
29 30 31 |
# File 'app/controllers/adminpanel/application_controller.rb', line 29 def @menu_items = end |
#handle_unverified_request ⇒ Object
24 25 26 27 |
# File 'app/controllers/adminpanel/application_controller.rb', line 24 def handle_unverified_request sign_out super end |
#set_model ⇒ Object
20 21 22 |
# File 'app/controllers/adminpanel/application_controller.rb', line 20 def set_model @model = params[:controller].classify.constantize end |
#signed_in_user ⇒ Object
16 17 18 |
# File 'app/controllers/adminpanel/application_controller.rb', line 16 def signed_in_user redirect_to signin_url, :notice => "Favor de Iniciar sesion" unless signed_in? end |