This repository has been archived on 2020-05-27. You can view files and clone it, but cannot push or open issues/pull-requests.
binaryattraction/app/helpers/photos_helper.rb

15 lines
356 B
Ruby

module Merb
module PhotosHelper
def vote_count(photo)
curl = Gchart.pie(
:size => '400x200',
:title => "Oneable Results",
:legend => [ 'Not One', 'One' ],
:data => [ photo.zero_votes, photo.one_votes ],
:theme => :pastel
)
"<img src='#{curl}' alt='Chart Results' />"
end
end
end # Merb