1

I need to submit forms from a couple of remote sites to the central rails application that processes and stores data. You can think about it as of widget form (something similar to what Wufoo service provides).

These outside sites are going to be pure HTML (what means no server-side scripting - only JS/jQuery at browser side). I am aware that straight way to get it would be to put the form inside of an iframe element but I'd be glad to avoid this.

What would be a good and safe pattern to build such interaction?

I wrote simply HTML form sending data to create action in proper controller and submit form with AJAX/jQuery. It almost works, however I got

WARNING: Can't verify CSRF token authenticity

warning so, I'm sure, this approach would not be useful in production.

May someone who is experienced provide me some advice? Thank You.

0 Answers0