Sha256: c7d7db5702efe839fb9a2df1301ee95731bf2cc04f7f04e29ec353116962649d

Contents?: true

Size: 639 Bytes

Versions: 15

Compression:

Stored size: 639 Bytes

Contents

module Ems
  class ApplicationController < ActionController::Base
    # Make sure we only have authenticated users beyond this point
    before_filter :authenticate_user!
    # Also make sure we either have to check cancan or skipit, emtpy is too risky
    check_authorization
    
    # # Global cancan failure recovery
    # rescue_from CanCan::AccessDenied do |exception|
    #   redirect_to main_app.new_user_session_path, :alert => exception.message
    # end
    
    # We need to make sure that we are using the ems abilities in the EMS
    def current_ability
      @current_ability ||= Ability.new(current_user)
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
ems-0.1.6 app/controllers/ems/application_controller.rb
ems-0.1.5 app/controllers/ems/application_controller.rb
ems-0.1.4 app/controllers/ems/application_controller.rb
ems-0.1.3 app/controllers/ems/application_controller.rb
ems-0.1.2 app/controllers/ems/application_controller.rb
ems-0.1.1 app/controllers/ems/application_controller.rb
ems-0.1.0 app/controllers/ems/application_controller.rb
ems-0.0.9 app/controllers/ems/application_controller.rb
ems-0.0.8 app/controllers/ems/application_controller.rb
ems-0.0.7 app/controllers/ems/application_controller.rb
ems-0.0.6 app/controllers/ems/application_controller.rb
ems-0.0.5 app/controllers/ems/application_controller.rb
ems-0.0.4 app/controllers/ems/application_controller.rb
ems-0.0.3 app/controllers/ems/application_controller.rb
ems-0.0.2 app/controllers/ems/application_controller.rb