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


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.

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 forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs