Last active
May 3, 2019 22:24
-
-
Save Alacrity01/df64ecc98d4ca8dd20828fe9452d8c7b to your computer and use it in GitHub Desktop.
Week 2, Day 5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
params is a hash | |
@message = params[:message_1] | |
the syntax for adding key value pairs using params is URL?key=value&key=value&key=value&key=value <- this would create 4 key value pairs | |
e.g. http://localhost:3000/api/query_params?my_message=jimm&message_2=i meant jimmy&message_3=that's better | |
g <--abbreviation for generate in rails | |
c <--abbreviation for console in rails | |
s <--abbreviation for server in rails | |
puts does not go to the browser, it goes to the terminal | |
nil and null mean the same thing; depends on the language which is used | |
get '/segment_params/:this_is_a_variable' => 'params_examples#segment_params_action' <-- /: is a wildcard in URL segments |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment