Module: IconsHelper

Defined in:
app/helpers/icons_helper.rb

Instance Method Summary collapse

Instance Method Details

#exercise_status_icon(exercise) ⇒ Object



11
12
13
14
# File 'app/helpers/icons_helper.rb', line 11

def exercise_status_icon(exercise)
  link_to exercise_status_fa_icon(exercise),
          exercise_path(exercise) if current_user?
end

#fixed_fa_icon(name, options = {}) ⇒ Object



7
8
9
# File 'app/helpers/icons_helper.rb', line 7

def fixed_fa_icon(name, options={})
  fa_icon name, options.merge(class: 'fa-fw fixed-icon')
end

#language_icon(language) ⇒ Object



16
17
18
# File 'app/helpers/icons_helper.rb', line 16

def language_icon(language)
  tag('span', class: "fa da da-#{language.devicon} lang-icon", alt: language.name)
end

#status_icon(status_like) ⇒ Object

FIXME refactor names



3
4
5
# File 'app/helpers/icons_helper.rb', line 3

def status_icon(status_like)
  fa_icon *icon_for_status(status_like.to_mumuki_status)
end