that's not quite correct

How about: (assumes rails and haml)


> before_filter :find_tweet, :only => [:agree, :disagree_count]


(nice one, I totally forgot the filters... )

>
> def find_tweet
>  @tweet = tweet.find(params[:id])
> end
>
> def agree
>  @tweet.agree_count += 1
>  render :partial => 'consensus_agree'
> end
>
> def disagree
>  @tweet.disagree_count += 1
>  render :partial => 'consensus_agree'


this has to be
render :partial => 'consensus_disagree'
of course

end
>
> --------- _consensus_agree.haml ---------------
>
> %span{:style => 'color: green'}= @tweet.agree_count - 1
> %span{:style => 'color: red'}= @tweet.disagree_count
>
> -----------------------------------------------


so you'd have to have a second haml file for disagree.
Greetz