Skip to content

Commit

Permalink
fix: fixes error messages in web ui
Browse files Browse the repository at this point in the history
  • Loading branch information
adamcooke committed Jan 30, 2024
1 parent 4a46f69 commit 71f51db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def redirect_to_with_json(url, flash_messages = {})
def render_form_errors(action_name, object)
respond_to do |wants|
wants.html { render action_name }
wants.json { render json: { form_errors: object.errors.full_messages }, status: :unprocessable_entity }
wants.json { render json: { form_errors: object.errors.map(&:full_message) }, status: :unprocessable_entity }
end
end

Expand Down

0 comments on commit 71f51db

Please sign in to comment.