Skip to content

Total votes cached count #7

Description

@hulihanapplications

Should make_voteable models have a cached count for the voteable record, in addition to up_votes and down_votes? Right now, it seems there's no easy way to order records by total votes, only up_votes and down_votes.

For example, you'd add this to your database columns:

add_column :comments, :votes, :integer, :default => 0    

up_votes - down_votes would then be stored in in this attribute whenever up_vote or down_vote are called.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions