public
Description: pulled from http://juixe.com/svn/acts_as_voteable
Homepage: http://www.juixe.com/techknow/index.php/2006/06/24/acts-as-voteable-rails-plugin/
Clone URL: git://github.com/jaggederest/acts_as_voteable.git
name age message
file MIT-LICENSE Sat Jun 24 08:00:36 -0700 2006 Initial release of acts_as_voteable git-svn-id... [juixesvn]
file README Tue Jul 04 12:33:14 -0700 2006 Updated readme to include migration code git-s... [juixesvn]
file init.rb Sat Jun 24 08:00:36 -0700 2006 Initial release of acts_as_voteable git-svn-id... [juixesvn]
file install.rb Sat Jun 24 08:00:36 -0700 2006 Initial release of acts_as_voteable git-svn-id... [juixesvn]
directory lib/ Mon Jul 14 18:44:23 -0700 2008 Fix old rails style has many statement [jaggederest]
directory tasks/ Sat Jun 24 08:00:36 -0700 2006 Initial release of acts_as_voteable git-svn-id... [juixesvn]
directory test/ Sat Jun 24 08:00:36 -0700 2006 Initial release of acts_as_voteable git-svn-id... [juixesvn]
README
ActsAsVoteable
==============

Allows user to vote on the on models.

== Resources

Install
 * Run the following command:
 script/plugin install http://juixe.com/svn/acts_as_voteable
 
 * Create a new rails migration and add the following self.up and self.down methods
 
  def self.up
    create_table "votes", :force => true do |t|
      t.column "vote", :boolean, :default => false
      t.column "created_at", :datetime, :null => false
      t.column "voteable_type", :string, :limit => 15, :default => "", :null => false
      t.column "voteable_id", :integer, :default => 0, :null => false
      t.column "user_id", :integer, :default => 0, :null => false
    end
  
    add_index "votes", ["user_id"], :name => "fk_votes_user"
  end

  def self.down
    drop_table :votes
  end
 
== Usage

 
 * Make you ActiveRecord model act as voteable.
 
 class Model < ActiveRecord::Base
   acts_as_voteable
 end

== Credits

Xelipe - This plugin is heavily influenced by Acts As Commentable.

== More

http://www.juixe.com/techknow/index.php/2006/06/24/acts-as-voteable-rails-plugin/
http://www.juixe.com/projects/acts_as_voteable