Module: Api::V1::Teams::ControllerBase

Extended by:
ActiveSupport::Concern
Included in:
Api::V1::TeamsController
Defined in:
app/controllers/concerns/api/v1/teams/controller_base.rb

Defined Under Namespace

Modules: StrongParameters

Instance Method Summary collapse

Instance Method Details

#indexObject

GET /api/v1/teams



34
35
# File 'app/controllers/concerns/api/v1/teams/controller_base.rb', line 34

def index
end

#showObject

GET /api/v1/teams/:id



38
39
# File 'app/controllers/concerns/api/v1/teams/controller_base.rb', line 38

def show
end

#updateObject

PATCH/PUT /api/v1/teams/:id



42
43
44
45
46
47
48
# File 'app/controllers/concerns/api/v1/teams/controller_base.rb', line 42

def update
  if @team.update(team_params)
    render :show
  else
    render json: @team.errors, status: :unprocessable_entity
  end
end