[Rails] save or update with a single button
Rails 3.1.3
I have a form that can save a new entry to DB.
Also jQuery ajax retrieves the saved data into the SAME form so that
users can edit it.
In order to make it work, the 'save' button should function as both
'save' and 'update'. And of course, its functionality goes through
conditions such as
if changed -> update
if not -> ignore or overwrite
Could anyone give me a specific example of such control method?
Thanks in advance.
soichi
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home