0-30%
30-60%
60-90%
90-100%
Assume @pokemon = Pokemon.new
post '/pokemons', to: 'pokemons#create', as: :pokemons
get '/pokemons/new', to: 'pokemons#new', as: :pokemons
patch '/pokemons', to: 'pokemons#create', as: :pokemons
post '/pokemons/new', to: 'pokemons#new', as: :new_pokemon
= simple_form_for @pokemon do |f| = f.input :name = f.button :submit
= simple_form_for @pokemon do |f| ...
= simple_form_for @pokemon, url: pokemons_path(@pokemon), method: :post do |f| ...
Post to pokemons_path (new resource) or patch to pokemon_path (updating resource) behind the scenes.
resources :pokemons does all this already!
We turn an idea into an app from start to finish!
For the future!