Calendar is shown
This commit is contained in:
@@ -22,6 +22,7 @@ class TeamsController < ApplicationController
|
||||
# POST /teams or /teams.json
|
||||
def create
|
||||
@team = Team.new(team_params)
|
||||
@team.company = Company.first
|
||||
|
||||
respond_to do |format|
|
||||
if @team.save
|
||||
@@ -36,6 +37,7 @@ class TeamsController < ApplicationController
|
||||
|
||||
# PATCH/PUT /teams/1 or /teams/1.json
|
||||
def update
|
||||
@team.company = Company.first
|
||||
respond_to do |format|
|
||||
if @team.update(team_params)
|
||||
format.html { redirect_to team_url(@team), notice: "Team was successfully updated." }
|
||||
@@ -65,6 +67,6 @@ class TeamsController < ApplicationController
|
||||
|
||||
# Only allow a list of trusted parameters through.
|
||||
def team_params
|
||||
params.fetch(:team, {})
|
||||
params.require(:team).permit(:name)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user