I have an HTML5 website where the user can enter some comments. I have a model in my Rails app and I want to store the uses comments in my app. I am lost as to how should I proceed with it.. I have the basic idea, but not sure how to implement it. Here are the steps which I think are required
- Append the comment data to a url. something like app.herokuapp.com?params=xxx
- Create a route to a controller action in my routes file for handling post requests..
- In my controller action, I need to extract the params and create the entry.
Creating the entry is pretty simple. But I am lost on the routes and extracting the info from the url part. Any Idea or tips? THANKS A LOT.
I have a rails 3.2 app, ruby 1.9.3. Simple javascript/html5/jquery webpages..