ruby on rails 3 - Will CSRF token warning prevent devise from having a current user? -
i use jquery ajax update timeslot model page showing campaign. campaign signup sheet columns of days , rows of time_slots. user can join timeslot clicking correct checkbox.
when implemented feature several months ago wasn't getting errors. now, i'm getting 500 error saying there internal server error. did digging , appears error caused devise's current_user
method not returning value. there csrf warning in log. causes nilclass returned , mismatched type exception thrown. causes 500 error.
do need supply csrf token information in ajax call? if do, best way it?
you can skip csrf check controller action ajax calling with:
skip_before_filter :verify_authenticity_token, :only => :some_action
Comments
Post a Comment