Sha256: cf3e0b9b594747cd1d99af485d034b24ed66118ddfee5bed8d9d2a09ab00444a
Contents?: true
Size: 418 Bytes
Versions: 4
Compression:
Stored size: 418 Bytes
Contents
class ApplicationController < ActionController::Base # Prevent CSRF attacks by raising an exception. # For APIs, you may want to use :null_session instead. protect_from_forgery with: :exception # added by PagesCMS. Fill out this helper to protect your controllers." def logged_in_admin # Do something if admin # is not logged in # ie: redirect_to root_path unless current_user.admin end end
Version data entries
4 entries across 4 versions & 1 rubygems