search for: vote_count

Displaying 1 result from an estimated 1 matches for "vote_count".

Did you mean: votes_count
2008 Feb 05
1
Functional Test has error when testing controller updates_attribute of its parrent.
...cted_to vote_path(assigns(:vote)) end end This tests the :create action of the vote controller which looks like this. def create @vote = Vote.new(params[:vote]) respond_to do |format| if @vote.save # Update the entry vote count and vote total columns @vote.entry.vote_count ||= 0 @vote.entry.vote_total ||= 0 @vote.entry.vote_count += 1 @vote.entry.vote_total += @vote.vote_value @vote.entry.update_attribute(:vote_count, @vote.entry.vote_count) @vote.entry.update_attribute(:vote_total, @vote.entry.vote_total) flash[:notic...