site-wide override of permission_denied doesn't work
Reported by Matt Jones | August 25th, 2009 @ 09:34 PM | in Beyond Hobo 1.0
You get an error message ("super: no superclass method
permission_denied'") unless you define permission_denied in
each controller in addition to ApplicationController; something
weird is going on where super is looking for the method in the
original object. Maybe wycats can provide some info - he's all
about the calling super in modules thing.
Comments and changes to this ticket
-
Bryan Larsen August 28th, 2009 @ 02:46 PM
- State changed from new to open
-
Bryan Larsen August 28th, 2009 @ 02:55 PM
- Tag changed from bug, model-controller to defect, model-controller
-
Matt Jones October 30th, 2009 @ 03:42 PM
- Milestone changed from Hobo 1.0 - Final to Beyond Hobo 1.0
Ran across this AGAIN in an app; more digging revealed that it's an issue with ActiveSupport's Rescuable class. It calls method(:permission_denied), which apparently has a bug in Ruby 1.8.x that messes things up.
See also this example:
http://gist.github.com/221585And a note on a similar bug found by the JRuby guys in 1.8.6:
http://redmine.ruby-lang.org/issues/show/1151Switching this to 'Beyond Hobo 1.0', because I can't see any way to patch it on our end.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป