--0015174c0f68ee0b830471788983
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

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  weet.find(params[:id])
> end
>
> def agree
>  @tweet.agree_count + 
>  render :partial 'consensus_agree'
> end
>
> def disagree
>  @tweet.disagree_count + 
>  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

--0015174c0f68ee0b830471788983--