README.rdoc in make_voteable-0.0.2 vs README.rdoc in make_voteable-0.1.0

- old
+ new

@@ -24,11 +24,11 @@ add_column :questions, :up_votes, :integer, :null => false, :default => 0 add_column :questions, :down_votes, :integer, :null => false, :default => 0 migrate the database - rails db:migrate + rake db:migrate == Usage # Specify a voteable model. class Question < ActiveRecord::Base @@ -87,9 +87,17 @@ # Returns true if the question was up voted by the user, false otherwise user.up_voted?(question) # Returns true if the question was down voted by the user, false otherwise user.down_voted?(question) + + # Access votings through voter + voting = user.votings.first + voting.up_vote? # true if up vote, false if down vote + + # Access votings through voteable + voting = question.votings.first + voting.up_vote? # true if up vote, false if down vote == Testing MakeVoteable uses RSpec for testing and has a rake task for executing the provided specs