#922 ✓resolved
Bryan Larsen

not easy to override access_denied

Reported by Bryan Larsen | February 21st, 2011 @ 09:11 PM

The problem: you can define a custom access_denied function on any controller, and it works fine. However, it cannot be defined in ApplicationController, because then the definition happens before the call to hobo_model_controller and gets overridden by the definition in authentication_support.rb. I tried wrapping the method definition with unless method_defined?(:access_denied) but that didn't work because of course it's never defined in the AuthenticationSupport module. If I wrap it with unless ApplicationController.method_defined?(:access_denied); def access_denied(user_model)... it works, but that's pretty stinky code.

Any thoughts? Perhaps something in Hobo::Controller.included(base)?

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