Sha256: 428c57abd6f6f6cc64faafdebc0fbbf23e2488ce5d0114ca96f8157d9100fcbb
Contents?: true
Size: 415 Bytes
Versions: 13
Compression:
Stored size: 415 Bytes
Contents
class ApplicationController < ActionController::Base # 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 # Prevent CSRF attacks by raising an exception. # For APIs, you may want to use :null_session instead. protect_from_forgery with: :exception end
Version data entries
13 entries across 13 versions & 1 rubygems