Skip to content
GitLab
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
c3760fb2
Commit
c3760fb2
authored
Oct 23, 2018
by
Jiri Strojil
Browse files
Possibly fixed all the tests
parent
5fbfb33b
Pipeline
#29261
failed with stage
in 51 minutes and 11 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
app/controllers/semester_process_volunteers_controller.rb
View file @
c3760fb2
...
...
@@ -12,8 +12,8 @@ class SemesterProcessVolunteersController < ApplicationController
def
submit_review
assign_reviewed_attributes
set_reviewed
@semester_process_volunteer
.
volunteer
.
validate_waive_and_bank
=
true
begin
ActiveRecord
::
Base
.
transaction
do
@semester_process_volunteer
.
semester_feedbacks
<<
@feedback
...
...
app/models/volunteer.rb
View file @
c3760fb2
...
...
@@ -82,7 +82,7 @@ class Volunteer < ApplicationRecord
#
validates
:contact
,
presence:
true
validates_presence_of
:iban
,
:bank
,
unless: :waive?
validates_presence_of
:iban
,
:bank
,
if:
->
{
validate_waive_and_bank
&&
waive
.
blank?
}
validates
:salutation
,
presence:
true
validates_attachment
:avatar
,
content_type:
{
content_type:
/\Aimage\/.*\z/
...
...
@@ -92,6 +92,8 @@ class Volunteer < ApplicationRecord
if: :external?
,
unless: :user_deleted?
attr_accessor
:validate_waive_and_bank
scope
:process_eq
,
lambda
{
|
process
|
return
unless
process
.
present?
return
joins
(
:user
).
merge
(
User
.
with_pending_invitation
)
if
process
==
'havent_logged_in'
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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