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