Permalink
Browse files

changes

  • Loading branch information...
1 parent 59d81e5 commit 2144f4ce59a80b55a386aca299a6ba7231c21c8e @timothyf committed Jul 10, 2010
View
No changes.
@@ -0,0 +1,39 @@
+ActsAsLikable
+=============
+
+Allows user to like on the models.
+
+== Resources
+
+Install
+ * Run the following command:
+ script/plugin install git://github.com/adventtec/acts_as_likable.git
+
+ * Create a new rails migration and add the following self.up and self.down methods
+
+ def self.up
+ create_table "likes", :force => true do |t|
+ t.column "user_id", :integer, :default => 0, :null => false
+ t.column "likable_type", :string, :limit => 15, :default => "", :null => false
+ t.column "likable_id", :integer, :default => 0, :null => false
+ t.timestamps
+ end
+
+ add_index "likes", ["user_id"], :name => fk_likes_user
+ end
+
+ def self.down
+ drop_table :likes
+ end
+
+== Usage
+
+ * Make your ActiveRecord model act as likable.
+
+ class Model < ActiveRecord::Base
+ acts_as_likable
+ end
+
+== Credits
+
+ Juixe.com - This project is heavily influenced by Acts As Votable
View
No changes.
View
No changes.
View
No changes.
View
No changes.
No changes.
View
No changes.
No changes.
No changes.
View
No changes.

0 comments on commit 2144f4c

Please sign in to comment.