This Saturday, starting at 4 PM
ending on Sunday at noon
Located in the Woz
Prizes for best beginner hacks too!
0-30%
30-60%
60-90%
get 'obtain', to: '/items/obtain/'
get 'items/obtain/1', to: 'obtain'
get '/items/obtain/:id', to: 'items#obtain'
get '/items/obtain/1', to: 'items/obtain'
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 %> <% end %>
<%= simple_form_for @pokemon do |f| %> ... <% end %>
<%= 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!
We teach more git/github during class
For next time!
Visiting '/users' in the browser
User.create! name: 'Sam', email: 'sam@sam.com'
Quit.create text: ''
User.quits.create! text: 'I am a quitter.'