Commit 6b82a9ef authored by Matija Čupić's avatar Matija Čupić

Format validation errors as human readable messages

parent bf2a040c
......@@ -7,7 +7,7 @@ module Groups
format.json do
return head :ok if @group.update(variables_params)
render status: :bad_request, json: @group.errors.to_hash
render status: :bad_request, json: @group.errors.full_messages
end
end
end
......
......@@ -6,7 +6,7 @@ class Projects::VariablesController < Projects::ApplicationController
format.json do
return head :ok if @project.update(variables_params)
render status: :bad_request, json: @project.errors.to_hash
render status: :bad_request, json: @project.errors.full_messages
end
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment