mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Don't show flash messages in customer edition form
They don't actually show up when the customer is saved, but the next time the page is reloaded. We already have the save bar for the same purpose so it's not necessary.
This commit is contained in:
@@ -51,6 +51,18 @@ module Admin
|
||||
end
|
||||
end
|
||||
|
||||
# copy of Admin::ResourceController without flash notice
|
||||
def update
|
||||
if @object.update(permitted_resource_params)
|
||||
respond_with(@object) do |format|
|
||||
format.html { redirect_to location_after_save }
|
||||
format.js { render layout: false }
|
||||
end
|
||||
else
|
||||
respond_with(@object)
|
||||
end
|
||||
end
|
||||
|
||||
# copy of Admin::ResourceController without flash notice
|
||||
def destroy
|
||||
if @object.destroy
|
||||
|
||||
Reference in New Issue
Block a user