Skip to content

Instantly share code, notes, and snippets.

@rgsoto
Forked from Shiggiddie/gist:643e7153605354b84686
Last active December 16, 2015 03:06
Show Gist options
  • Save rgsoto/499f49d693dc5db720e7 to your computer and use it in GitHub Desktop.
Save rgsoto/499f49d693dc5db720e7 to your computer and use it in GitHub Desktop.
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 "<h1>Hello POST world PLUS</h1>" 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 "<h1>Hello POST world NO-PLUS</h1>"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment