Fix register member and contribution bugs
This commit is contained in:
parent
90541319f3
commit
160c389981
@ -20,6 +20,7 @@ class ContributionsController < ApplicationController
|
|||||||
if @contribution.save
|
if @contribution.save
|
||||||
@member.handle_new_contribution(@contribution, params.dig(:contribution, :overriden_expires_on))
|
@member.handle_new_contribution(@contribution, params.dig(:contribution, :overriden_expires_on))
|
||||||
@member.reset_status!
|
@member.reset_status!
|
||||||
|
@member.regenerate_notifications
|
||||||
|
|
||||||
redirect_to @member, notice: "Contribution was successfully created."
|
redirect_to @member, notice: "Contribution was successfully created."
|
||||||
else
|
else
|
||||||
|
@ -25,7 +25,7 @@ class MembersController < ApplicationController
|
|||||||
|
|
||||||
# POST /members
|
# POST /members
|
||||||
def create
|
def create
|
||||||
@member = Member.new(member_params)
|
@member = Member.new(member_params.merge(number: Member.maximum(:number) + 1))
|
||||||
|
|
||||||
if @member.save
|
if @member.save
|
||||||
@member.reset_status!
|
@member.reset_status!
|
||||||
|
Loading…
Reference in New Issue
Block a user