public
Description: A generic voting app that hooks into faces.rubyonrails.com.au so members can vote with their IRC Nicks. #crc
Homepage:
Clone URL: git://github.com/artpop/roro-vote.git
roro-vote / app / helpers / topics_helper.rb
100644 16 lines (12 sloc) 0.425 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
module TopicsHelper
  
  def vote_description(vote)
    "#{vote.irc_nick} voted for option <i>#{vote.choice.name}</i> on the topic #{link_to vote.topic.name, topic_url(vote.topic)}"
  end
  
  def vote_face(vote)
    unless vote.face.nil?
      image_tag vote.face, :alt => "#{vote.irc_nick}'s ugly face"
    else
      image_tag "no-face.png", :alt => "#{vote.irc_nick} is too slack to upload his face"
    end
  end
  
end