Sha256: f1b12a1c012808a5adc14062947e3152283ad5c2a321c47d58e55742a4a58e44

Contents?: true

Size: 731 Bytes

Versions: 11

Compression:

Stored size: 731 Bytes

Contents

module Adminpanel
    class ApplicationController < ActionController::Base
        protect_from_forgery

        inherit_resources

        include SessionsHelper
        include RestActionsHelper
        include RouterHelper

        layout "admin"

        before_filter :signed_in_user, :set_model, :get_menu_elements


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

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

        def handle_unverified_request
            sign_out
            super
        end

        def get_menu_elements
            @menu_items = menu_items
        end
    end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
adminpanel-1.2.8 app/controllers/adminpanel/application_controller.rb
adminpanel-1.2.7 app/controllers/adminpanel/application_controller.rb
adminpanel-1.2.6 app/controllers/adminpanel/application_controller.rb
adminpanel-1.2.5 app/controllers/adminpanel/application_controller.rb
adminpanel-1.2.4 app/controllers/adminpanel/application_controller.rb
adminpanel-1.2.3 app/controllers/adminpanel/application_controller.rb
adminpanel-1.2.2 app/controllers/adminpanel/application_controller.rb
adminpanel-1.2.1 app/controllers/adminpanel/application_controller.rb
adminpanel-1.2.0 app/controllers/adminpanel/application_controller.rb
adminpanel-1.1.0 app/controllers/adminpanel/application_controller.rb
adminpanel-1.0.0 app/controllers/adminpanel/application_controller.rb