enable gang rename
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user