stffn / declarative_authorization

An unmaintained authorization plugin for Rails. Please fork to support current versions of Rails
MIT License
1.24k stars 231 forks source link

Application is not redirecting when use an engine #188

Open houmanka opened 10 years ago

houmanka commented 10 years ago

Hi guys, Sorry for asking this question here. It is not the issue with this gem. I am just desperate so I thought I can get help faster in here.

I have mounted an engine to my application. Then I changed the application_controller.rb in the engine to class ApplicationController < ActionController::ApplicationController. When I use filter_resource_access in the engine controller I get that page is not redirecting properly.

Any idea why this happen? technically it should redirecting the page to the root and tell me that I am not authorize to view this page.

houmanka commented 10 years ago

After permission denied: Here is the log : Redirected to http://0.0.0.0:3000/blog/ : Filter chain halted as :filter_access_filter rendered or redirected : Completed 302 Found in 3ms (ActiveRecord: 0.3ms)