Module: BadgesEngine::BadgesUser::InstanceMethods

Defined in:
lib/badges_engine/badges_user.rb

Instance Method Summary collapse

Instance Method Details

#add_badge(badge_or_name) ⇒ Object



18
19
20
# File 'lib/badges_engine/badges_user.rb', line 18

def add_badge(badge_or_name)
  badge = badge_or_name.is_a?(BadgesEngine::Badge) ? badge_or_name : BadgesEngine::Badge.find_by_name(badge_or_name)
end