You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
700 B

13 years ago
class ApplicationController < ActionController::Base
before_filter :authenticate_user!
include SentientController
protect_from_forgery
13 years ago
rescue_from CanCan::AccessDenied, ActiveScaffold::ActionNotAllowed do |exception|
flash.now[:error] = exception.message
render :template => 'errors/access_denied', :layout => 'errors'
end
rescue_from ActiveScaffold::ActionNotAllowed do |exception|
flash.now[:error] = I18n.t("errors.action_not_allowed")
13 years ago
render :template => 'errors/access_denied', :layout => 'errors'
end
13 years ago
protected
def ensure_nested_under_domain
raise CanCan::AccessDenied, "not found" unless nested? and nested_parent_record.is_a?(Domain)
end
13 years ago
end