@@ -20,11 +20,9 @@ def create
20
20
activities = Activity . find ( public_post_params [ :participant_attributes ] . to_h . select { |_ , participant | participant [ 'participate' ] . nil? || participant [ 'participate' ] . to_b == true } . map { |_ , participant | participant [ 'id' ] . to_i } )
21
21
total = 0
22
22
23
- flash [ :error ] = I18n . t ( :no_bank_provided , scope : 'activerecord.errors.subscribe' ) if non_master_omits_bank
24
23
@member . valid? unless flash [ :error ] . nil?
25
24
26
25
if flash [ :error ] . nil? && @member . save
27
-
28
26
# create account and send welcome email
29
27
user = User . create_on_member_enrollment! ( @member )
30
28
user . resend_confirmation! ( :activation_instructions )
@@ -53,9 +51,7 @@ def create
53
51
transaction = Payment . new (
54
52
description : I18n . t ( "form.introduction" , user : @member . name ) ,
55
53
amount : total - Settings . mongoose_ideal_costs , # Transaction costs are paid by the association
56
- issuer : params [ :bank ] ,
57
54
member : @member ,
58
-
59
55
transaction_id : activities . map ( &:id ) ,
60
56
transaction_type : :activity ,
61
57
payment_type : :ideal ,
@@ -120,12 +116,7 @@ def public_post_params
120
116
:student_id ,
121
117
:birth_date ,
122
118
:join_date ,
123
- :bank ,
124
119
participant_attributes : [ :id , :participate ] ,
125
120
educations_attributes : [ :id , :study_id , :_destroy ] )
126
121
end
127
-
128
- def non_master_omits_bank
129
- params [ :bank ] . blank? && @member . educations . none? { |education | Study . find ( education . study_id ) . masters }
130
- end
131
122
end
0 commit comments