Name: routing_playground
Owner: Turing School of Software & Design
Description: null
Forked from: s-espinosa/routing_playground
Created: 2017-01-25 21:41:11.0
Updated: 2017-02-27 05:48:51.0
Pushed: 2016-08-17 20:35:21.0
Homepage: null
Size: 9
Language: Ruby
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Routes Playground is a simple app built with Sinatra to explore and illustrate how routing works in Sinatra. In order to use it, clone this repo, cd into it in your terminal, and run shotgun
from the command line in the routing_playground
directory. You should see your server start up.
Once you have it up and running, use the following steps/questions to guide your exploration. Later instructions depend on earlier changes, so if you don't go step by step there's a decent chance that later steps will break.
app/views/home.erb
file:k rel="stylesheet" href="/css/rewrite.css">
app/controllers/playground_app.rb
file:'/css/rewrite.css' do
dy { background-color: orange }"
root
.app/controllers/playground_app.rb
)/index.html
? Do you have a route for it?/index.html
.index.html
(the file that?s being served in the previous step)/
. Add one./index.html
. Did anything change? Any thoughts on why/why not?get '/nested/index.html'
index.html
in your /public/nested/
directory./nested/index.html
?/nested/index.html
/public/nested/index.html
file to something else./nested/index.html
to see if there's a change.index.html
/public/nested/index.html
file (that you just renamed back to index.html
, right?)/public/css/
/public/nested/css
/nested/index.html
?/public/nested/index.html
to include a leading /
(e.g. /css/nested.css
)Based on all of the above, write a quick summary of some basic rules for how routing works in Sinatra.