Two fields in model but only need to store last field selected by user

7 views
Skip to first unread message

lekha p.

unread,
Oct 4, 2013, 5:54:43 AM10/4/13
to rubyonra...@googlegroups.com
Hi,


Please help me
I have two fields in a form, One field stores photo, am using paperclip
and another field stores link of picture from web.
My problem is i have to store only one value of any field which user
selects at last. Pls help me to do this.

--
Posted via http://www.ruby-forum.com/.

jsnark

unread,
Oct 4, 2013, 8:46:01 AM10/4/13
to rubyonra...@googlegroups.com
I would use javascript and jquery to keep track of the user's last selection.  Then, also with javascript, intercept the submit and using ajax send the request containing only the last selection.
Reply all
Reply to author
Forward
0 new messages