diff --git a/app/controllers/teams_controller.rb b/app/controllers/teams_controller.rb index d8cd2dc..9ac63ea 100644 --- a/app/controllers/teams_controller.rb +++ b/app/controllers/teams_controller.rb @@ -1,5 +1,9 @@ class TeamsController < ApplicationController - # TODO: Add your controller actions here - # You'll need a 'new' action to display the form - # You'll need a 'create' action to process the form submission + def new + @team = Team.new + end + + def create + @team = Team.create(params.permit(:name, :coach, :pg, :sg, :pf, :sf, :c)) + end end diff --git a/app/models/team.rb b/app/models/team.rb new file mode 100644 index 0000000..48a6c83 --- /dev/null +++ b/app/models/team.rb @@ -0,0 +1,2 @@ +class Team < ApplicationRecord +end diff --git a/app/views/teams/create.html.erb b/app/views/teams/create.html.erb index 3d56f29..ddb4e3d 100644 --- a/app/views/teams/create.html.erb +++ b/app/views/teams/create.html.erb @@ -5,19 +5,14 @@