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
6552b09f
Commit
6552b09f
authored
Nov 14, 2018
by
Jiri Strojil
💬
Browse files
Merge branch 'fixes/cannot-create-semester-process' into 'develop'
Bug: can't create SemesterProcess See merge request
!846
parents
a6ba64af
8eab7cc8
Pipeline
#30819
passed with stage
in 48 minutes and 10 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
app/controllers/semester_processes_controller.rb
View file @
6552b09f
...
...
@@ -36,7 +36,7 @@ class SemesterProcessesController < ApplicationController
mail_subject_template:
semester_process_params
[
:subject
]
)
@semester_process
.
build_semester_volunteers
(
@volunteers
,
selected_volunteers:
selected_volunteers
)
@semester_process
.
build_semester_volunteers
(
@volunteers
,
selected_volunteers
)
@semester_process
.
build_volunteers_hours_feedbacks_and_mails
if
@semester_process
.
save
...
...
app/models/semester_process.rb
View file @
6552b09f
...
...
@@ -69,7 +69,7 @@ class SemesterProcess < ApplicationRecord
end
def
build_semester_volunteers
(
volunteers
,
selected
=
nil
)
volunteers
=
volunteers
.
where
(
id:
selected
)
if
selected
volunteers
=
volunteers
.
select
{
|
volunteer
|
selected
.
include?
volunteer
.
id
}
if
selected
&&
selected
.
any?
semester_process_volunteers
<<
volunteers
.
to_a
.
map
do
|
volunteer
|
spv
=
SemesterProcessVolunteer
.
new
(
volunteer:
volunteer
,
selected:
false
)
spv
.
build_missions
(
semester
)
...
...
Write
Preview
Supports
Markdown
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