Refactored proposal. Enabled cancancan

This commit is contained in:
Henne Vogelsang 2014-07-23 16:24:05 +02:00
parent 0ae7991943
commit c982cbb88a
13 changed files with 204 additions and 231 deletions

View file

@ -64,10 +64,6 @@ class ApplicationController < ActionController::Base
redirect_to root_path unless has_role?(current_user, 'admin')
end
def current_ability
@current_ability ||= AdminAbility.new(current_user)
end
rescue_from CanCan::AccessDenied do |exception|
Rails.logger.debug("Access denied!")
redirect_to root_path, alert: exception.message