Referal?

So Justin Hankins is upset that he doesn’t have any cool referals. Hmm. How can we remedy this? Um, everyone click the link. :) Yes, I’m still downtown. Going home soon to go to bed, and to wake up and do it all again tomorrow.

  1. Rrahime says:

    This works fine for GET reequsts, but if you have to make any POST reequst using :remote (like when creating, deleting or updating in a RESTfull implementation) the session is going to be blank because the authenticity token is not passed in this cases; the forgery protection in rails and prototype prevents this. For this to work when calling a :destroy (:method => :delete) or :update action with :remote set to true (an AJAX call) the authenticity token needs to be included manually in the parameters of the reequst like this: items , :action => destroy', :id => item, :authenticity_token => form_authenticity_token }, :method => :delete, :remote => true %>with this you can make sure in the controller action to handle reequsts properly, for any format (:js, :html, ml)regards, hope this helps.

Post a comment

Name or OpenID (required)


(lesstile enabled - surround code blocks with ---)