Hello folks. I’m starting to Ruby on Rails and I have a doubt about a very straightforward application.
Suppose I have a form whose fields are all blank. On this same page, I have another form on which I can query for some information from my database.
Is there any nice way on which I can gather the query results and fill the first form’s fields with it using AJAX, without having to write handling functions in Javascript, only using Ruby ?
The closer I got from it was putting the first form inside a
I am thinking about writing a function that writes a xml document with the results instead of the whole html code for the form, then I would have just to write a single javascript function to handle it. But I wonder whether exists some ellegant way to do it in rails.
Thanks
Felipe