Sha256: 88874230b6a78555b2d4255dff3cc1113cebe79f2a5b599d69ed213b88e3f1ed
Contents?: true
Size: 416 Bytes
Versions: 8
Compression:
Stored size: 416 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
8 entries across 8 versions & 1 rubygems