Skip to content

Instantly share code, notes, and snippets.

@GKhalsa
Forked from Carmer/Intro_to_sinatra_check.md
Last active March 22, 2016 04:49
Show Gist options
  • Save GKhalsa/00f16c25d86cc7a41e6e to your computer and use it in GitHub Desktop.
Save GKhalsa/00f16c25d86cc7a41e6e to your computer and use it in GitHub Desktop.

Introduction to Sinatra

1. What is the purpose of the server file (routing)?

Contains all the verbs and routing, to give back the info that is requested.

2. How do you pass variables into the views?

  Through instance variables 
  setting :locals

3. How can we interpolate ruby into a view (html)?

 <% or <%=

4. In what format does data come in from a view/form? What do we call it?

Html

5. What are params?

Params is the data the is being transfered through forms?

@Carmer
Copy link

Carmer commented Mar 22, 2016

A view is html, data that comes from a view as the value in our params hash has a String

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment