turingschool/routing_playground

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

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Routes Playground

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.

Beginnings
CSS from Our Controller (don't ever do this)
k rel="stylesheet" href="/css/rewrite.css">
More CSS from Our Controller (seriously… don't ever do this)
'/css/rewrite.css' do
dy { background-color: orange }"

Visiting Routes That Don't Exist (still… probably don't do this)
Public vs. Controllers
Relative vs. Absolute Paths
Review

Based on all of the above, write a quick summary of some basic rules for how routing works in Sinatra.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.