On Jul 22, 12:31 pm, Tamilselvi Srinivasan <rails-mailing-l...@andreas-
s.net> wrote:
> Thanks for the quick reply,
> Am getting the radio button options from answers table. also its a group
> of radio buttons.
> so the count means for the radio_button id. if i change the count as
> follows
>
> <%=radio_button(:survey, :nominees, count,  :onclick =>
> @voting.increment!('vote_count') ) %> <%= response.nomination %>
>

the onclick option needs to be a fragment of javascript. Right now you
are calling @voting.increment! at the point that the template is
rendered.

Fred

>  i cant select the option for each question. i can only select one
> option for the whole survey.
>
> Rails List wrote:
> > Tamilselvi Srinivasan wrote:
> >> Tried with that, no change.
>
> >>> Keep a default value in the answer table for this particular field
> >>> instead of keeping it NULL
>
> >>> Kannan
> >>>http://www.classifieds.org.in
>
> > <%= radio_button yourmodel, model-attribute, value, :onclick=>something
> > %>
>
> --
> Posted viahttp://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to