Module: EffectiveMentorshipsHelper
- Defined in:
- app/helpers/effective_mentorships_helper.rb
Instance Method Summary collapse
- #mentorship_categories_collection ⇒ Object
- #mentorship_cycle_label ⇒ Object
- #mentorship_cycles_label ⇒ Object
- #mentorship_group_label ⇒ Object
- #mentorship_group_user_label ⇒ Object
- #mentorship_group_users_label ⇒ Object
- #mentorship_groups_label ⇒ Object
- #mentorship_registration_label ⇒ Object
- #mentorship_registrations_label ⇒ Object
- #mentorship_role_badge(mentorship_role) ⇒ Object
- #mentorship_role_label(role) ⇒ Object
- #mentorship_roles_collection ⇒ Object
- #mentorships_mentee_label ⇒ Object
- #mentorships_mentees_label ⇒ Object
- #mentorships_mentor_label ⇒ Object
- #mentorships_mentors_label ⇒ Object
- #mentorships_name_label ⇒ Object
Instance Method Details
#mentorship_categories_collection ⇒ Object
59 60 61 |
# File 'app/helpers/effective_mentorships_helper.rb', line 59 def mentorship_categories_collection EffectiveMentorships.MentorshipRegistration.mentorship_categories end |
#mentorship_cycle_label ⇒ Object
7 8 9 |
# File 'app/helpers/effective_mentorships_helper.rb', line 7 def mentorship_cycle_label et(Effective::MentorshipCycle) end |
#mentorship_cycles_label ⇒ Object
11 12 13 |
# File 'app/helpers/effective_mentorships_helper.rb', line 11 def mentorship_cycles_label ets(Effective::MentorshipCycle) end |
#mentorship_group_label ⇒ Object
23 24 25 |
# File 'app/helpers/effective_mentorships_helper.rb', line 23 def mentorship_group_label et(EffectiveMentorships.MentorshipGroup) end |
#mentorship_group_user_label ⇒ Object
31 32 33 |
# File 'app/helpers/effective_mentorships_helper.rb', line 31 def mentorship_group_user_label ets(Effective::MentorshipGroupUser) end |
#mentorship_group_users_label ⇒ Object
35 36 37 |
# File 'app/helpers/effective_mentorships_helper.rb', line 35 def mentorship_group_users_label ets(Effective::MentorshipGroupUser) end |
#mentorship_groups_label ⇒ Object
27 28 29 |
# File 'app/helpers/effective_mentorships_helper.rb', line 27 def mentorship_groups_label ets(EffectiveMentorships.MentorshipGroup) end |
#mentorship_registration_label ⇒ Object
15 16 17 |
# File 'app/helpers/effective_mentorships_helper.rb', line 15 def mentorship_registration_label et(EffectiveMentorships.MentorshipRegistration) end |
#mentorship_registrations_label ⇒ Object
19 20 21 |
# File 'app/helpers/effective_mentorships_helper.rb', line 19 def mentorship_registrations_label ets(EffectiveMentorships.MentorshipRegistration) end |
#mentorship_role_badge(mentorship_role) ⇒ Object
72 73 74 |
# File 'app/helpers/effective_mentorships_helper.rb', line 72 def mentorship_role_badge(mentorship_role) badge(mentorship_role_label(mentorship_role)) end |
#mentorship_role_label(role) ⇒ Object
63 64 65 66 67 68 69 70 |
# File 'app/helpers/effective_mentorships_helper.rb', line 63 def mentorship_role_label(role) case role.to_s when 'mentor' then et('effective_mentorships.mentor') when 'mentee' then et('effective_mentorships.mentee') else raise("unexpected mentorship role: #{role}") end end |
#mentorship_roles_collection ⇒ Object
55 56 57 |
# File 'app/helpers/effective_mentorships_helper.rb', line 55 def mentorship_roles_collection EffectiveMentorships.MentorshipRegistration.mentorship_roles.map { |role| [mentorship_role_label(role), role] } end |
#mentorships_mentee_label ⇒ Object
39 40 41 |
# File 'app/helpers/effective_mentorships_helper.rb', line 39 def mentorships_mentee_label et('effective_mentorships.mentee') end |
#mentorships_mentees_label ⇒ Object
43 44 45 |
# File 'app/helpers/effective_mentorships_helper.rb', line 43 def mentorships_mentees_label ets('effective_mentorships.mentee') end |
#mentorships_mentor_label ⇒ Object
47 48 49 |
# File 'app/helpers/effective_mentorships_helper.rb', line 47 def mentorships_mentor_label et('effective_mentorships.mentor') end |
#mentorships_mentors_label ⇒ Object
51 52 53 |
# File 'app/helpers/effective_mentorships_helper.rb', line 51 def mentorships_mentors_label ets('effective_mentorships.mentor') end |
#mentorships_name_label ⇒ Object
3 4 5 |
# File 'app/helpers/effective_mentorships_helper.rb', line 3 def mentorships_name_label et('effective_mentorships.name') end |