twitter / activerecord-reputation-system

An Active Record Reputation System for Rails
Apache License 2.0
1.33k stars 122 forks source link

Rails 4 branch not sorting index page by likes. #68

Open jessewaites opened 11 years ago

jessewaites commented 11 years ago

Im using the Rails 4 branch of this and having issues - I think something is broken. Users can vote, and anyone can see the votes, but the index page does not sort at all. Controller- I'm using Can Can btw, in case that is relevant.

def index @fonts = Font.find_with_reputation(:likes, :all, {:order => 'likes DESC'}) end

eelcoj commented 10 years ago

Is there a solution for this? Seem to stumbled upon the same issue.

Duplicate of https://github.com/twitter/activerecord-reputation-system/issues/62

Failing test of https://travis-ci.org/twitter/activerecord-reputation-system/jobs/6014002#L232 could be related.

jessewaites commented 10 years ago

I never got it fixed. I have a feeling that it might be related to Can Can but I'm not sure.

eelcoj commented 10 years ago

@piratebroadcast nope, don't use CanCan here.

caiosba commented 10 years ago

FYI, I have a fork with a Rails 4 branch... all tests are passing and I'm using it on a Rails4 + Ruby 2 application without problems... you can try that and let me know if things are not working there: https://github.com/caiosba/activerecord-reputation-system/tree/rails4

jessewaites commented 10 years ago

Can you reflect that in the readme and tell us specifically how to use your version in our gemfiles? I think the readme is a duplicate of the original. thank you for your hard work!!

On Mon, Sep 8, 2014 at 4:37 PM, Caio Almeida notifications@github.com wrote:

FYI, I have a fork with a Rails 4 branch... all tests are passing and I'm using it on a Rails4 + Ruby 2 application without problems... you can try that and let me know if things are not working there: https://github.com/caiosba/activerecord-reputation-system/tree/rails4

— Reply to this email directly or view it on GitHub https://github.com/twitter/activerecord-reputation-system/issues/68#issuecomment-54883140 .

Jesse Waites LinkedIn http://www.linkedin.com/profile/view?id=69029327

caiosba commented 10 years ago

Oh, yes, sure... just did that :)

jessewaites commented 10 years ago

Awesome - Thanks!!

On Mon, Sep 8, 2014 at 4:51 PM, Caio Almeida notifications@github.com wrote:

Oh, yes, sure... just did that :)

— Reply to this email directly or view it on GitHub https://github.com/twitter/activerecord-reputation-system/issues/68#issuecomment-54885162 .

Jesse Waites LinkedIn http://www.linkedin.com/profile/view?id=69029327