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.
21 lines
693 B
21 lines
693 B
class ApplicationController < ActionController::Base |
|
before_filter :authenticate_user! |
|
include SentientController |
|
protect_from_forgery |
|
|
|
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("action_not_allowed") |
|
render :template => 'errors/access_denied', :layout => 'errors' |
|
end |
|
|
|
protected |
|
|
|
def ensure_nested_under_domain |
|
raise CanCan::AccessDenied, "not found" unless nested? and nested_parent_record.is_a?(Domain) |
|
end |
|
end
|
|
|