Fix register member and contribution bugs

This commit is contained in:
Hugo Peixoto 2022-10-06 15:05:30 +01:00
parent 90541319f3
commit 160c389981
2 changed files with 2 additions and 1 deletions

View File

@ -20,6 +20,7 @@ class ContributionsController < ApplicationController
if @contribution.save
@member.handle_new_contribution(@contribution, params.dig(:contribution, :overriden_expires_on))
@member.reset_status!
@member.regenerate_notifications
redirect_to @member, notice: "Contribution was successfully created."
else

View File

@ -25,7 +25,7 @@ class MembersController < ApplicationController
# POST /members
def create
@member = Member.new(member_params)
@member = Member.new(member_params.merge(number: Member.maximum(:number) + 1))
if @member.save
@member.reset_status!