#741 ✓resolved
Bryan Larsen

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

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.

New-ticket Create new ticket

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

Referenced by

Pages