Reputation: 7872
I have a very strange problem in my Ruby on Rails application. I have controller that looks like this:
class PersonReportsController < ApplicationController
include ActionController::Live
load_and_authorize_resource except: [:index]
def index
#some code
end
end
and when I try to access it as an unlogged user application throws following error:
uncaught throw :warden
But when I delete from my controller:
include ActionController::Live
everything works fine... Any ideas how to solve this problem?
Upvotes: 1
Views: 2660
Reputation: 7872
Everything is explained here: https://github.com/plataformatec/devise/issues/2332
Wrapping my routes in an authenticate do...end block is a great workaround
Upvotes: 1