this post will be useful in understanding the logic you need for this
task. stars, css and the works is upto your own discretion..

http://blog.aisleten.com/2007/05/03/ajax-css-star-rating-with-acts_as_rateable/

On Aug 3, 4:58 pm, Tamilselvi Srinivasan <rails-mailing-l...@andreas-
s.net> wrote:
> sorry,i have missed to paste the <%end%> in the post.
>
> actually i need to compare the selected nominee  with the available
> nominees .
> if both are equal then i need to update the vote_count. so only i
> updated the model in view..
>
>
>
> Eddy Josafat wrote:
> > Why are you doing model updating in the view? Can you post the
> > corresponding controller code?
>
> > You use a loop to read every record in your table, and inside that
> > loop, the line:
>
> > voting.update_attribute('vote_count', voting.vote_count+1 )
>
> > updates every record adding one to the previous value. Your "if
> > voting.question....." encloses only the line below it (It appears that
> > <% end %>  is missing.
>
> > On 3 ago, 11:01, Tamilselvi Srinivasan <rails-mailing-l...@andreas-
>
> --
> 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