[Rails] Re: radio_button not updating the database

2009-07-22 Thread Rails List
Tamilselvi Srinivasan wrote: Hi, Am creating a survey, in which am getting the questions from question table and answers from answers table. In the survey table am displaying the questions with the answers as multiple choice using radio buttons. Also while selcting the option the vote_count

[Rails] Re: radio_button not updating the database

2009-07-22 Thread Tamilselvi Srinivasan
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 -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message

[Rails] Re: radio_button not updating the database

2009-07-22 Thread Rails List
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 via

[Rails] Re: radio_button not updating the database

2009-07-22 Thread Tamilselvi Srinivasan
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') ) % %=

[Rails] Re: radio_button not updating the database

2009-07-22 Thread Frederick Cheung
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