Forum: Ruby on Rails Two fields in model but only need to store last field selected by user

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
B17f09d655b15d963e3c4313c3164f59?d=identicon&s=25 Lekha P. (lekha_p)
on 2013-10-04 11:54

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.
jsnark (Guest)
on 2013-10-04 14:47
(Received via mailing list)
I would use javascript and jquery to keep track of the user's last
selection.  Then, also with javascript, intercept the submit and using
send the request containing only the last selection.
This topic is locked and can not be replied to.