Skip to content

Commit b4aac7b

Browse files
committed
bug: migrate intro page to new mollie sdk
1 parent 552f169 commit b4aac7b

File tree

2 files changed

+0
-12
lines changed

2 files changed

+0
-12
lines changed

app/controllers/public/home_controller.rb

-9
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,9 @@ def create
2020
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 })
2121
total = 0
2222

23-
flash[:error] = I18n.t(:no_bank_provided, scope: 'activerecord.errors.subscribe') if non_master_omits_bank
2423
@member.valid? unless flash[:error].nil?
2524

2625
if flash[:error].nil? && @member.save
27-
2826
# create account and send welcome email
2927
user = User.create_on_member_enrollment!(@member)
3028
user.resend_confirmation!(:activation_instructions)
@@ -53,9 +51,7 @@ def create
5351
transaction = Payment.new(
5452
description: I18n.t("form.introduction", user: @member.name),
5553
amount: total - Settings.mongoose_ideal_costs, # Transaction costs are paid by the association
56-
issuer: params[:bank],
5754
member: @member,
58-
5955
transaction_id: activities.map(&:id),
6056
transaction_type: :activity,
6157
payment_type: :ideal,
@@ -120,12 +116,7 @@ def public_post_params
120116
:student_id,
121117
:birth_date,
122118
:join_date,
123-
:bank,
124119
participant_attributes: [:id, :participate],
125120
educations_attributes: [:id, :study_id, :_destroy])
126121
end
127-
128-
def non_master_omits_bank
129-
params[:bank].blank? && @member.educations.none? { |education| Study.find(education.study_id).masters }
130-
end
131122
end

app/views/public/home/index.html.haml

-3
Original file line numberDiff line numberDiff line change
@@ -249,9 +249,6 @@
249249
.form-group.field
250250
%label{for: ''}= I18n.t(:payment_method, scope: 'form')
251251
= select_tag 'method', options_for_select(['IDEAL'], @method), { :class => 'form-control' }
252-
.form-group.field
253-
%label{for: '', :id => 'bank'}= I18n.t(:bank, scope: 'form')
254-
= select_tag 'bank', options_for_select(Payment::ideal_issuers, @bank), { :class => 'form-control' }
255252

256253
%button.btn.btn-primary{type: 'submit'}= I18n.t(:finish_signup, scope: 'form')
257254

0 commit comments

Comments
 (0)