Module: MedalHelper

Defined in:
app/helpers/medal_helper.rb

Instance Method Summary collapse

Instance Method Details

#content_medal_for(content, user) ⇒ Object



6
7
8
# File 'app/helpers/medal_helper.rb', line 6

def content_medal_for(content, user)
  medal_for content, 'content', completion_class_for(content, user)
end

#corollary_medal_for(content) ⇒ Object



10
11
12
# File 'app/helpers/medal_helper.rb', line 10

def corollary_medal_for(content)
  medal_for content, 'corollary'
end

#should_display_medal?(content, organization) ⇒ Boolean

Returns:

  • (Boolean)


2
3
4
# File 'app/helpers/medal_helper.rb', line 2

def should_display_medal?(content, organization)
  content.medal.present? && organization.gamification_enabled?
end