On Thu, Jan 24, 2013 at 9:14 PM, Advantage+ wrote:
> I need to create a simple poll for users and stumped on saving the results
> when user submits the poll.
>
> Poll hasMany Question
>
> Poll hasMany Result
>
> Question hasMany Choice
This is how I did it:
Poll
= 1,2,3,4
2013/1/25 Advantage+
I need to create a simple poll for users and stumped on saving the results
when user submits the poll.
Poll hasMany Question
Poll hasMany Result
Question hasMany Choice
Pretty simple, but how do you save the results since viewing the poll
creates
| choice_id | other_result
1 | 1|NULL
2 | 2|NULL
3 | 4|"hmmm i don't know about that"
4 | 2|NULL
#notes: 4 is "Other"
Next... you can find("count") WHERE choice_id = 1,2,3,4
2013/1/25 Advan
I need to create a simple poll for users and stumped on saving the results
when user submits the poll.
Poll hasMany Question
Poll hasMany Result
Question hasMany Choice
Pretty simple, but how do you save the results since viewing the poll
creates a form to save Poll?
View the poll/$id