Use success notices where appropriate
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
b7bf957dd2
commit
346e36e160
@ -33,7 +33,11 @@ class Admin::DonationsController < Admin::BaseController
|
|||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
if @donation.save
|
if @donation.save
|
||||||
format.html { redirect_to admin_donation_url(@donation), notice: 'Donation was successfully created.' }
|
format.html do
|
||||||
|
redirect_to admin_donation_url(@donation), flash: {
|
||||||
|
success: 'Donation was successfully created.'
|
||||||
|
}
|
||||||
|
end
|
||||||
format.json { render :show, status: :created, location: @donation }
|
format.json { render :show, status: :created, location: @donation }
|
||||||
else
|
else
|
||||||
format.html { render :new }
|
format.html { render :new }
|
||||||
@ -47,7 +51,11 @@ class Admin::DonationsController < Admin::BaseController
|
|||||||
def update
|
def update
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
if @donation.update(donation_params)
|
if @donation.update(donation_params)
|
||||||
format.html { redirect_to admin_donation_url(@donation), notice: 'Donation was successfully updated.' }
|
format.html do
|
||||||
|
redirect_to admin_donation_url(@donation), flash: {
|
||||||
|
success: 'Donation was successfully updated.'
|
||||||
|
}
|
||||||
|
end
|
||||||
format.json { render :show, status: :ok, location: @donation }
|
format.json { render :show, status: :ok, location: @donation }
|
||||||
else
|
else
|
||||||
format.html { render :edit }
|
format.html { render :edit }
|
||||||
@ -61,7 +69,10 @@ class Admin::DonationsController < Admin::BaseController
|
|||||||
def destroy
|
def destroy
|
||||||
@donation.destroy
|
@donation.destroy
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html { redirect_to admin_donations_url, notice: 'Donation was successfully destroyed.' }
|
format.html do redirect_to admin_donations_url, flash: {
|
||||||
|
success: 'Donation was successfully destroyed.'
|
||||||
|
}
|
||||||
|
end
|
||||||
format.json { head :no_content }
|
format.json { head :no_content }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -27,7 +27,10 @@ class InvitationsController < ApplicationController
|
|||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
if @invitation.save
|
if @invitation.save
|
||||||
format.html { redirect_to @invitation, notice: 'Invitation was successfully created.' }
|
format.html do redirect_to @invitation, flash: {
|
||||||
|
success: 'Invitation was successfully created.'
|
||||||
|
}
|
||||||
|
end
|
||||||
format.json { render :show, status: :created, location: @invitation }
|
format.json { render :show, status: :created, location: @invitation }
|
||||||
else
|
else
|
||||||
format.html { render :new }
|
format.html { render :new }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user