Module: InvitationCodesHelper

Defined in:
app/helpers/invitation_codes_helper.rb

Instance Method Summary collapse

Instance Method Details

#invite_hidden_tag(invite) ⇒ Object


4
5
6
7
8
# File 'app/helpers/invitation_codes_helper.rb', line 4

def invite_hidden_tag(invite)
  if invite.present?
    hidden_field_tag 'invite[token]', invite.token
  end
end

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

def invite_link(invite_code)
  text_field_tag :invite_code, invite_code_url(invite_code), class: "form-control", readonly: true
end

#invited_by_messageObject


14
15
16
17
18
19
20
# File 'app/helpers/invitation_codes_helper.rb', line 14

def invited_by_message
  inviter = current_user.invited_by
  if inviter.present?
    @person = inviter.person
    render partial: "people/add_contact"
  end
end