Reputation: 8113
I am using Clearance gem. It's "half" working.
I can do all basic actions (sign up, sign in, :authorize).
But, when I do a POST action to a controller, it just signs me out ...
Here what's in the log :
Started POST "/monkeys" for 127.0.0.1 at Fri Jun 03 06:22:00 -0400 2011
Processing by MonkeysController#create as HTML
Parameters: {"commit"=>"Save monkey", "authenticity_token"=>"[FILTERED]", "utf8"=>"\342\234\223", "monkey"=>{"name"=>"fghfgh", "description"=>"fghfgh"}}
User Load (0.1ms) SELECT `users`.* FROM `users` WHERE `users`.`remember_token` = 'c1f450a81fde65282e73ce41f69095b66d782e34' LIMIT 1
SQL (0.1ms) BEGIN
AREL (0.3ms) UPDATE `users` SET `remember_token` = 'b9c2cac3d446bee370e40619c6c8cd42c457bb13', `updated_at` = '2011-06-03 10:22:00' WHERE `users`.`id` = 4
SQL (1.1ms) COMMIT
Redirected to http://localhost:3000/sign_in
When that happens, I am actually signed in.. what might I have missed?
Thanks
Upvotes: 1
Views: 236
Reputation: 8113
It was actually because of my cookie domain, for some reason, localhost is not right. So i added a simple dns called "monkey.local" on my machine, and now I access the application with it and all works fine.
I also believe I can use 127.0.0.0 and it would work. I'll try it at home.
Upvotes: 1