2012-01-25 32 views

回答

1

你應該使用:

@items = Item.plusminus_tally({:order => "vote_count ASC"}) 

我在那裏包含了命令覆蓋,以防你想從降序的默認值改變它。這是爲Rails 3

一個子項目應該有它自己:

acts_as_voteable 
在其模型

+0

感謝分享。它節省了我幾天的工作。 – ArkoD