Skip to content

Instantly share code, notes, and snippets.

View rgsoto's full-sized avatar

Renier G Soto rgsoto

View GitHub Profile
@rgsoto
rgsoto / rails-exercise.md
Last active December 16, 2015 03:06 — forked from Shiggiddie/gist:643e7153605354b84686
Ruby/Rails HW: get/post routes, passing parameters into .erb templates, .erb if/else template logic
  1. Make a new Rails project.
  2. Make necessary modifications to the project such that an HTML response of "<h1>Hello World</h1>" is returned when hitting the path "hello_world" with a GET request
  3. Make necessary modifications to the rails project such that an HTML response of "<h1>Hello POST world</h1>" is returned when hitting the path "hello_world" with a POST request, do not remove any code created in #1.
  4. Make necessary modifications to the rails project such that an HTML response of "Hello POST world PLUS" is returned when hitting the path "hello_world" with a POST request AND a payload that contains the key/value pair "plus"/"true", otherwise the HTML response should be "Hello POST world NO-PLUS"