I’m trying to use the Warden gem via RailsWarden. It is not working,
but I guess I don’t understand a few things.
How do you access a Rack thing from a method in your controller?
env[:warden] fails with a method not found error for env.
I want only certain actions to check to see if the user is logged in.
I assumed that warden was doing all the work since my strategy checked
for the correct password. I didn’t need to do anything in my
controller login action
Here is the strategy code:
puts “logging in”
params[:login][:password] == ‘password’ ? success! : fail!
However any password succeeds. Indeed the puts are never happening.
Does/can warden log what it is doing? Nothing is getting logged to the
console or development.log.