I have a simple rails webpage where a user enters in a few textfields and uploads a picture. Rails then stores the picture and updates the databases on the server. It works fine.
However, I also need a script on another computer to update the web page occasioanlly using the curl/curb libraries. When i try to do that, though, I get this error:
ActionController::InvalidAuthenticityToken (ActionController::InvalidAuthenticityToken)
When I look closer, it seems that rails puts in a hidden field called "authenticity_token" whenever it creates a form:
<form action="/headshots/single" enctype="multipart/form-data" method="post"> <input name="authenticity_token" type="hidden" value="798b514826513c881613a0c18b52839489a12181" /> . . . </form>
The curb script won't work because it doesn't have the "authenticity_token" thing. Is there any way around this? Maybe make another webpage that does the same thing, but just for my curb script?