mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-03 02:21:33 +00:00
Show error messages
There shouldn't normally be errors, but I got one due to bad data during development, and this helped sort it out.
This commit is contained in:
@@ -18,7 +18,7 @@ module Admin
|
||||
respond_to do |format|
|
||||
format.json { render json: { errors: @cp_set.errors }, status: :bad_request }
|
||||
format.turbo_stream {
|
||||
flash.now[:error] = t('.error')
|
||||
flash.now[:error] = @cp_set.errors.full_messages.to_sentence
|
||||
render :bulk_update, locals: { action: permitted_params[:action_name] }
|
||||
}
|
||||
end
|
||||
@@ -55,6 +55,7 @@ module Admin
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
@cp_set = Sets::ColumnPreferenceSet.new(@column_preferences, collection_attributes:)
|
||||
end
|
||||
|
||||
|
||||
@@ -764,7 +764,6 @@ en:
|
||||
column_preferences:
|
||||
bulk_update:
|
||||
success: "Column preferences saved"
|
||||
error: "Column preferences could not be saved"
|
||||
contents:
|
||||
edit:
|
||||
title: Content
|
||||
|
||||
Reference in New Issue
Block a user