For some reason, current_user
returns nil
in my model-less controller (Subscriptions
). I have found nothing on the Internet to justif
It turned out the AJAX request I was making didn't carry the CSRF token. For that reason, Rails was killing my session.
I added skip_before_filter :verify_authenticity_token
in my SubscriptionsController
and it is now working. It might not be the most secure solution, but it works for now, so I continue to develop and come back to this issue later.