I’m on my first Rails app, and have this question.
I have a page with a form and with next and previous buttons (which
are do submit/post), and some other links (like logout, update-user-
Problem – I want it to look to the user like, as soon as they enter
something in a field, it’s posted and in the database (barring unusual
One way I can imagine is for the form to be automagically posted no
matter how the user leaves the page, by the submit buttons or the
links, or even, if possible, the user navigating away by entering a
I’ve certainly seen plenty of web pages that know when you are
navigating away by any means.
Another way, it seems to me not as good, is simply to make the links
into submit buttons. That’s fine, but can I at least style a button
to look like a link? This and subsequent methods would, I presume,
not save if the user navigated away without my buttons or links.
Or, is there a way to make a link do a post?
Or, is there some way to do it with routes (I just started reading
Or, something else altogether? (Sorry for my ignorance on what might
be a simple question.)