Allow gang edit #34

Merged
bilal.catic merged 2 commits from allow-gang-edit into master 2020-10-12 00:38:48 +02:00
Showing only changes of commit b048cb2392 - Show all commits

View File

@@ -18,12 +18,15 @@ class GangsController < ApplicationController
end
def update
if gang_params[:chip_scale].to_i.positive?
Gang.update(gang_params)
if params[:id]
gang = Gang.find(params[:id])
gang.update!(gang_params)
json_response onboarded: true
else
error_response :bad_request
end
rescue StandardError
error_response :bad_request
end
private