I am fairly new to RoR and I am working on a project that is a picture contest. The user will post several pictures and then everyone will be able to vote for the their favorite picture. I have several models at play. The contest model which is a grouping of pictures. The pictures model which belongs to both user and contest. And user model which can vote. I need users to be able to vote once for their favorite picture in a contest, essentially picking it as their choice. I am trying to use act_as_votable to accomplish this? Would this be done using the scope? Is there a better way? Any help/code examples would be greatly appreciated.
Related topics
Topic | Replies | Views | Activity | |
---|---|---|---|---|
acts_as_votable ( aka acts_as_likeable) | 1 | 230 | February 18, 2016 | |
acts_as_list - can you use it "twice" for a model, like one using :position and another using :rank? | 1 | 166 | July 4, 2012 | |
acts_as_list with :scope - how do I move items to a different list? | 1 | 150 | May 1, 2007 | |
using has_many, acts_as_list together | 0 | 108 | October 20, 2006 | |
Need Help: Deployment Issues with Voting App? | 3 | 127 | December 4, 2008 |