parent
2b32bc0e62
commit
a5018ba917
@ -0,0 +1,20 @@
|
|||||||
|
<h1>Creating a New Movie</h1>
|
||||||
|
|
||||||
|
<%= form_with(model: @movie) do |f| %>
|
||||||
|
<%= f.label :title %>
|
||||||
|
<%= f.text_field :title %>
|
||||||
|
|
||||||
|
<%= f.label :description %>
|
||||||
|
<%= f.text_area :description, rows: 7 %>
|
||||||
|
|
||||||
|
<%= f.label :rating %>
|
||||||
|
<%= f.text_field :rating %>
|
||||||
|
|
||||||
|
<%= f.label :released_on %>
|
||||||
|
<%= f.date_field :released_on %>
|
||||||
|
|
||||||
|
<%= f.label :total_gross %>
|
||||||
|
<%= f.number_field :total_gross %>
|
||||||
|
|
||||||
|
<%= f.submit %>
|
||||||
|
<% end %>
|
@ -1,7 +1,5 @@
|
|||||||
Rails.application.routes.draw do
|
Rails.application.routes.draw do
|
||||||
root "movies#index"
|
root "movies#index"
|
||||||
get "movies" => "movies#index"
|
|
||||||
get "movies/:id" => "movies#show", as: "movie"
|
resources :movies
|
||||||
patch "movies/:id" => "movies#update"
|
|
||||||
get "movies/:id/edit" => "movies#edit", as: "edit_movie"
|
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in new issue