Saturday, July 27, 2013

[Rails] Using act as votable

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/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/f9a9cd3a401c9fadeb121a5129c8d78c%40ruby-forum.com.
For more options, visit https://groups.google.com/groups/opt_out.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate