I'm RoR begginer, I'm learning everything from zero. I'm creating election system and I have problem which stopped me.
Here's my github repo: http://ift.tt/1D8Axs4
My problem is that during creating vote(localhost:3000/votes) I would like to have form with 3 fields (3 reasons for canceled votes) and put there numbers of canceled votes in each field. Then I would like to this numbers been updated in constituencies table. Function should take current user id which has assigned constituency_id. And also this canceled votes should be sum up and put as one record in constituency table on record : bad_votes. Any ideas? Please kindly help me, I just come to a standstill.
Aucun commentaire:
Enregistrer un commentaire