Inherited controllers not inheriting ApplicationController methods #144

Closed
strangeement opened this Issue May 22, 2011 · 3 comments

Comments

Projects
None yet
2 participants

I'm sure I'm doing something wrong here but I noticed similar issues with InheritedResources controllers not being able to properly use ApplicationController methods or blocks. I'm still pretty new to Rails but here it goes.

Specifically, I'm implementing CanCan and trying to use rescue_from for AccessDenied exceptions. If I put the rescue_from block in ApplicationController, it is ignored. The exact same block works if I put it instead in the controller with load_and_authorize_resource.

Since InheritedResources::Base inherits from ApplicationController, it should be able to work with the rescue_block from ApplicationController, right?

Contributor

thedarkone commented May 22, 2011

Hey, just a shot in the dark... have you tried restarting the server?

That's it! ApplicationController is not reloaded on page reloads, the server has to be restarted. TIL!

Thanks.

Contributor

thedarkone commented May 22, 2011

This is not by design, it's a bug: #95.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment