permission_denied errors when calling superclass's super
Reported by Bryan Larsen | June 17th, 2010 @ 04:27 PM | in Hobo 1.1
ModelController#permission_denied has this code:
if self.class.superclass.method_defined?("permission_denied")
super
else
It's checking to see if permission_denied
exists on
ApplicationController, but then calling it on UsersController.
Here's the fix:
if self.class.superclass.method_defined?("permission_denied")
self.class.superclass.instance_method(:permission_denied).bind(self).call(error)
else
unless somebody else has a cleaner method
Comments and changes to this ticket
-
Bryan Larsen June 18th, 2010 @ 01:57 PM
- State changed from new to resolved
(from [7692aeafa372cdb0e4aa9c4386f50a26bc1171d8]) [#741 state:resolved] allow not_found and permission_denied to be overridden in ApplicationController
http://github.com/tablatom/hobo/commit/7692aeafa372cdb0e4aa9c4386f5...
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 »
People watching this ticket
Tags
Referenced by
- 741 permission_denied errors when calling superclass's super (from [7692aeafa372cdb0e4aa9c4386f50a26bc1171d8]) [#741 s...