Merge branch 'master' into registry-927

This commit is contained in:
Maciej Szlosarczyk 2018-08-17 11:28:41 +03:00
commit 07072ec6cb
No known key found for this signature in database
GPG key ID: 41D62D42D3B0D765
11 changed files with 741 additions and 52 deletions

View file

@ -10,12 +10,12 @@ class Registrar
@deposit = Deposit.new(deposit_params.merge(registrar: current_user.registrar))
@invoice = @deposit.issue_prepayment_invoice
if @invoice&.persisted?
if @invoice
flash[:notice] = t(:please_pay_the_following_invoice)
redirect_to [:registrar, @invoice]
else
flash.now[:alert] = t(:failed_to_create_record)
render 'new'
flash[:alert] = @deposit.errors.full_messages.join(', ')
redirect_to new_registrar_deposit_path
end
end