diaspora/app/helpers/invitation_codes_helper.rb
theworldbright 98f11b944a Fix styleguide violations
Fix hound remark 12

Remove unnecessary explicit div tag

Rename el_**** to ****El (hound remark 2 and 3)

Only find and replace operations were done with
this commit

Fix hound remark 4 and 8

Fix hound remark 6

Fix hound remark 7

Fix hound remark 9

Fix hound remark 10 and 11

Fix hound remark 13

Fix hound remark 1

Change single quotes to double quotes

Change single quotes to double in publisher view

Fix camelCase and missing {} in publisher view

Change single quotes to double in bookmarklet view

Use dot notation for serializedForm in publisher

Change single quotes to double in bookmarklet spec

Change single quotes to double in publisher spec

Fix missing {} in publisher views

Use ruby 1.9 hash syntax in invite_link

Fix indentation in publisher view
2015-06-04 18:05:44 +02:00

19 lines
576 B
Ruby

module InvitationCodesHelper
def invite_hidden_tag(invite)
if invite.present?
hidden_field_tag 'invite[token]', invite.token
end
end
def invite_link(invite_code)
text_field_tag :invite_code, invite_code_url(invite_code), class: "form-control", readonly: true
end
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
end