Skip to content

Instantly share code, notes, and snippets.

@slavikdev
Created March 16, 2017 17:54
Show Gist options
  • Save slavikdev/5a203f9d233e107ee1ef4080a84fb42d to your computer and use it in GitHub Desktop.
Save slavikdev/5a203f9d233e107ee1ef4080a84fb42d to your computer and use it in GitHub Desktop.
Rails request path cheatsheet

Rails request path cheatsheet

Full path with query string

>>  request.url
=> "http://localhost:3000/ask-help.amp?hui=pizda"

Virtual path without query string

>>  request.path
=> "/ask-help.amp"

Virtual path with query string

>>  request.fullpath
=> "/ask-help.amp?hui=pizda"
@aphilippi
Copy link

nice params[:hui] :)

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