rename original gangsta to gang

This commit is contained in:
Bilal
2020-10-07 18:26:59 +03:00
parent b5a70a6e42
commit e0c5f60c68
13 changed files with 67 additions and 63 deletions

View File

@@ -0,0 +1,28 @@
class GangsController < ApplicationController
def show
if Gang.count.zero?
Gang.create.save
end
json_response Gang.first
end
def update
if gang_params[:chip_scale].to_i.positive?
Gang.update(gang_params)
json_response onboarded: true
else
error_response :bad_request
end
end
private
def gang_params
params.require(:gang).permit :chip_name,
:chip_code,
:chip_symbol,
:chip_scale,
:chip_prefixed
end
end