Thursday 15 September 2011

ruby - rails, 2 iterations of acts_as_votable -



ruby - rails, 2 iterations of acts_as_votable -

i have acts_as_votable voting scheme working right now.

but, want add together sec vote link/button scheme same model/user grouping track type of vote. how go doing this? thinking create whole new table/etc. thinking if there easier solution track vote within same tables?

thanks in advance!

votable model can voted under different scopes same user: @post.vote_by :voter => @user1, :vote_scope => 'week' @post.vote_by :voter => @user1, :vote_scope => 'month'

you can votes scope:

@post.find_votes_for(:vote_scope => 'rank')

there alot can acts_as_votable gem, don't need create new table.

ruby-on-rails ruby model voting

No comments:

Post a Comment