Using act as votable

50 views
Skip to first unread message

olah Lebby

unread,
Jul 27, 2013, 5:43:59 PM7/27/13
to rubyonra...@googlegroups.com
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.

--
Posted via http://www.ruby-forum.com/.
Reply all
Reply to author
Forward
0 new messages