add homie to the gang when homie is created
This commit is contained in:
@@ -1,4 +1,10 @@
|
||||
class GangsController < ApplicationController
|
||||
def index
|
||||
json_response Gang.all
|
||||
rescue StandardError
|
||||
error_response :bad_request
|
||||
end
|
||||
|
||||
def show
|
||||
if Gang.count.zero?
|
||||
Gang.create.save
|
||||
@@ -19,7 +25,8 @@ class GangsController < ApplicationController
|
||||
private
|
||||
|
||||
def gang_params
|
||||
params.require(:gang).permit :chip_name,
|
||||
params.require(:gang).permit :name,
|
||||
:chip_name,
|
||||
:chip_code,
|
||||
:chip_symbol,
|
||||
:chip_scale,
|
||||
|
||||
Reference in New Issue
Block a user