Skip to content

Commit

Permalink
ModelController - fix to checking in superclass for permission_denied…
Browse files Browse the repository at this point in the history
… and not_found methods
  • Loading branch information
tslocke committed Apr 24, 2008
1 parent 824d199 commit f178330
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hobo/lib/hobo/model_controller.rb
Expand Up @@ -500,7 +500,7 @@ def hobo_reorder

def permission_denied(error)
self.this = nil # Otherwise this gets sent user_view
if :permission_denied.in?(superclass.instance_methods)
if :permission_denied.in?(self.class.superclass.instance_methods)
super
else
respond_to do |wants|
Expand All @@ -520,7 +520,7 @@ def permission_denied(error)


def not_found(error)
if :not_found_response.in?(superclass.instance_methods)
if :not_found_response.in?(self.class.superclass.instance_methods)
super
elsif render_tag("not-found-page", {}, :status => 404)
# cool
Expand Down

1 comment on commit f178330

@wagenet
Copy link

@wagenet wagenet commented on f178330 May 9, 2008

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ran into this problem and was going to make the same fix. It’s nice to have it confirmed.

Please sign in to comment.