Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
open-source
aoz-003
Commits
0ea216e7
Commit
0ea216e7
authored
Sep 29, 2017
by
Kaspar Vollenweider
👻
Committed by
Kaspar
Oct 04, 2017
Browse files
accepting an external volunteer won't try to create a user
parent
1fd85553
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/controllers/volunteers_controller.rb
View file @
0ea216e7
...
...
@@ -72,7 +72,12 @@ class VolunteersController < ApplicationController
end
def
invite_volunteer_user
User
.
new_volunteer
(
@volunteer
)
&&
@volunteer
.
user
.
invite!
return
false
if
@volunteer
.
external
new_user
=
User
.
new
(
email:
@volunteer
.
contact
.
primary_email
,
password:
Devise
.
friendly_token
,
role:
'volunteer'
,
volunteer:
@volunteer
)
new_user
.
save
&&
new_user
.
invite!
end
def
set_volunteer
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment