Sha256: 0b36195785feaef813f3f60c7489cfb8456010e023691507a8c87ebd32024d5f

Contents?: true

Size: 491 Bytes

Versions: 3

Compression:

Stored size: 491 Bytes

Contents

class Manage::BaseController < ApplicationController
  include Sunrise::Controllers::Manage
  
  protected
  
    rescue_from CanCan::AccessDenied do |exception|
      flash[:failure] = exception.message
      flash[:failure] ||= I18n.t(:access_denied, :scope => [:flash, :users])
            
      respond_to do |format|
        format.html { redirect_to new_session_path(:user) }
        format.xml  { head :unauthorized }
        format.js   { head :unauthorized }
      end
    end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
sunrise-core-0.2.2 app/controllers/manage/base_controller.rb
sunrise-core-0.2.1 app/controllers/manage/base_controller.rb
sunrise-core-0.2.0 app/controllers/manage/base_controller.rb