Commit 00d5c1acd43201393665526666381e77b3b74578

Authored by Larissa Reis
1 parent 3dc6517a

tests if the invitation is a POST request

Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
app/controllers/public/invite_controller.rb
... ... @@ -58,7 +58,7 @@ class InviteController < PublicController
58 58  
59 59 def invite_registered_friend
60 60 contacts_to_invite = params['q'].split(',')
61   - if !contacts_to_invite.empty?
  61 + if !contacts_to_invite.empty? && request.post?
62 62 Delayed::Job.enqueue InvitationJob.new(user.id, contacts_to_invite, '', profile.id, nil, locale)
63 63 session[:notice] = _('Your invitations are being sent.')
64 64 if profile.person?
... ...