Search code examples
ruby-on-rails-3ruby-on-rails-3.2voting

Rails Resetting Thumbs_up votes


What's the easiest way to reset the vote counter to zero when a voting period is ended with the thumbs_up gem?

Say... for example... I want to set a topic that starts Monday at Midnight and ends Sunday at 11:59?

Also what's the quickest way to zero all the votes in MySql?


Solution

  • Wow... Guess I'll be answering this one myself.

    To reset the votes (in mysql at least), you just have to go into mysql's client and type in:

    truncate table [whateverthenameis];
    

    As for how to automate this... I haven't the slightest idea.