views:

9

answers:

1

Hi everyone,

I'd like my users to be able to use Google Translate with my Rails apps. I have forms and login for the app. I keep getting the Rails InvalidAuthenticityToken when using the app through Google Translate.

Any insights on how i can get both to work? I am using Rails 2.5.x.

Thank you!

PS: To clarify, this the authenticity token works fine without going through Google Translate. I suspect it's something to do with the domain?

A: 

This is a feature of rails that prevents cross site scripting attacks. It really depends what you are doing but what you need to do is pass this secret that rails passes in every params hash. Check you log file or server or debug your params and you will see this. It is a really long code.

This code is generate in your environment.rb file so whenever you pass params to your application you need to include this file.

Sam
Hi Sam, thank you for your response. my authenticity token set up works perfectly fine under normal circumstances, but through google translation service, it does not. thank you again.
janechii