Open-Source-Access-Control-.../app/controllers/application_controller.rb

11 lines
435 B
Ruby
Raw Normal View History

2012-08-25 04:14:51 +00:00
class ApplicationController < ActionController::Base
protect_from_forgery
rescue_from CanCan::AccessDenied do |exception|
if !current_user.nil? && current_user.orientation.blank? then
flash[:alert] = "Sorry, you need to complete New Member Orientation before having access to this page. <br/>Please check your email and schedule a New Member Orientation with a volunteer."
redirect_to root_url
end
end
2012-08-25 04:14:51 +00:00
end