I’m new to rails and still learning the ropes via railstutorial, but the book does all changes to the db via form submissions (http://api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html). But how would I go about submitting (updating the db) without this, lets say I want to add some score which is computed on page ,(for example via a js counter – for simplicity lets just say its a constant 10) and my db consists of a column called score. Then after pressing a submit button how would I go about updating the db?
Thanks
Two trivial ways:
The processing (other than GET v. POST) on the Rails side is identical–it’s just a parameter.
If you’re using JavaScript, there’s not necessarily a reason to not use a form, though, since you could just update a form input element and submit normally.