Sha256: 9cdc4a93a8f341911d9646b45783a90baa24c59b4ce1a457ce82c6f0990fa32e
Contents?: true
Size: 705 Bytes
Versions: 9
Compression:
Stored size: 705 Bytes
Contents
class ApplicationController < ActionController::Base protect_from_forgery rescue_from CanCan::AccessDenied, :with => :render_403 private def render_403 return if performed? if user_signed_in? respond_to do |format| format.html {render :template => 'page/403', :status => 403} format.xml {render :template => 'page/403', :status => 403} format.json { render :text => '{"error": "forbidden"}' } end else respond_to do |format| format.html {redirect_to new_user_session_url} format.xml {render :template => 'page/403', :status => 403} format.json { render :text => '{"error": "forbidden"}' } end end end end
Version data entries
9 entries across 9 versions & 1 rubygems