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

E67b403d10e3525a29c15e64841f44f5?d=identicon&s=25 lekha p. (lekha_p)
on 2013-10-04 11:54
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.
Db9510c96a4c0f6f88c9aa39ab24211a?d=identicon&s=25 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
ajax
send the request containing only the last selection.
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.