views:

135

answers:

1

Hey Guys,

I've recently installed http://github.com/peteonrails/vote%5Ffu/tree/master (vote_fu)

on an app I've been working on.

Essentially, I just want a list of items (lets say, posts for example) to display in descending order based on votes.

I added the acts_as_voteable to the posts model, and the acts_as_voter to the user model.

From here, I'm pretty confused - I see this "voter.vote_for(voteablemodel)" in the tutorial, for voting up a record. But I don't understan where I should be implementing it?

Should I just be adding it to a view, putting it in a new action in the controller?

I'm clearly still new - so i apologize for the simplistic questions as I struggle through.

Thanks in advance!

-Elliot

A: 

Views are used for displaying information. What you're describing belongs in the controller unless it's more than a few lines of code.

If you see your controller methods start to become bloated, try to think of ways to move that logic into your model or a module.

Andy Gaskell