README.markdown in acts_as_votable-0.3.1 vs README.markdown in acts_as_votable-0.4.0

- old
+ new

@@ -12,11 +12,11 @@ ### Rails 3 Just add the following to your Gemfile. - gem 'acts_as_votable' + gem 'acts_as_votable', '~> 0.4.0' And follow that up with a ``bundle install``. ### Database Migrations @@ -153,9 +153,30 @@ @user.voted_down_on? @comment2 # => true @user.voted_up_on? @comment2 # => false @user.voted_up_on? @comment3 # => false @user.voted_down_on? @comment3 # => false + +Also, you can obtain a list of all the objects a user has voted for. +This returns the actual objects instead of instances of the Vote model. +All objects are eager loaded + + @user.find_voted_items + + @user.find_up_voted_items + @user.find_liked_items + + @user.find_down_voted_items + @user.find_disliked_items + +Members of an individual model that a user has voted for can also be +displayed. The result is an ActiveRecord Relation. + + @user.get_voted Comment + + @user.get_up_voted Comment + + @user.get_down_voted Comment ### Registered Votes Voters can only vote once per model. In this example the 2nd vote does not count because @user has already voted for @shoe.