Module: TrophyHelper

Defined in:
app/helpers/trophy_helper.rb

Instance Method Summary collapse

Instance Method Details



3
4
5
6
7
8
9
10
11
# File 'app/helpers/trophy_helper.rb', line 3

def display_trophy_link(user, noid)
  trophyclass = "trophy-off"
  trophytitle= "Highlight File on Profile"
  if user.trophies.map(&:generic_file_id).include? noid
    trophyclass = "trophy-on"
  end

  link_to raw("<i class='#{trophyclass} icon-trophy'></i> #{trophytitle}"),"", :class=> 'trophy-class', :title => trophytitle, :id => noid,  :remote=>true # link to trophy
end