Module: InvitationCodesHelper

Defined in:
app/helpers/invitation_codes_helper.rb

Instance Method Summary collapse

Instance Method Details

#invite_hidden_tag(invite) ⇒ Object


2
3
4
5
6
# File 'app/helpers/invitation_codes_helper.rb', line 2

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

8
9
10
# File 'app/helpers/invitation_codes_helper.rb', line 8

def invite_link(invite_code)
  text_field_tag :invite_code, invite_code_url(invite_code), :readonly => true
end

#invited_by_messageObject


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

def invited_by_message
  inviter = current_user.invited_by
  if inviter.present?
    contact = current_user.contact_for(inviter.person) || Contact.new 
    render :partial => 'people/add_contact', :locals => {:inviter => inviter.person, :contact => contact}
  end
end