Skip to content

Commit

Permalink
[#741 state:resolved] allow not_found and permission_denied to be
Browse files Browse the repository at this point in the history
overridden in ApplicationController
  • Loading branch information
bryanlarsen committed Jun 18, 2010
1 parent 157d6df commit 7692aea
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions hobo/lib/hobo/controller.rb
Expand Up @@ -157,8 +157,8 @@ def request_no_cache?
end

def not_found(error)
if self.class.superclass.method_defined?("not_found_response")
super
if self.class.superclass.method_defined?(:not_found)
self.class.superclass.instance_method(:not_found).bind(self).call(error)
elsif render_tag("not-found-page", {}, :status => 404)
# cool
else
Expand Down
2 changes: 1 addition & 1 deletion hobo/lib/hobo/model_controller.rb
Expand Up @@ -772,7 +772,7 @@ def permission_denied(error)
logger.info "Hobo: Permission Denied!"
@permission_error = error
if self.class.superclass.method_defined?("permission_denied")
super
self.class.superclass.instance_method(:permission_denied).bind(self).call(error)
else
respond_to do |wants|
wants.html do
Expand Down

0 comments on commit 7692aea

Please sign in to comment.