search for: vote_tot

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

Did you mean: tot_tot
2008 Feb 05
1
Functional Test has error when testing controller updates_attribute of its parrent.
...nd 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[:notice] = ''Vote was successfull...