Skip to content

Instantly share code, notes, and snippets.

@leompeters
Last active August 29, 2015 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leompeters/3873420f180d51a17854 to your computer and use it in GitHub Desktop.
Save leompeters/3873420f180d51a17854 to your computer and use it in GitHub Desktop.
List all variables of HTTP Request Environment.
<!--
-- Licensed under the MIT license [http://www.opensource.org/licenses/mit-license.php]
-- Copyright (c) 2013 by Belanton, Inc. All Rights Reserved.
-->
<html>
<head>
<title>Belanton | Codes | Scripts | Request Env Variables</title>
<meta name="description" content="https://gist.github.com/leonardomarques/3873420f180d51a17854">
<meta name="keywords" content="Belanton,team,web,development,Ruby,Rails,ERB,HTML,request,env,environment,variables">
<meta name="author" content="Leonardo Marques - Belanton Team [http://www.belanton.com]">
</head>
<body>
<table class="table">
<th>key</th>
<th>Value</th>
<% for item in request.env %>
<tr>
<td><%= item[0] %></td>
<td><%= item[1] %></td>
</tr>
<% end %>
</table>
<!-- or -->
<ul>
<% request.env.each do |item| %>
<li><%= item[0] %> : <%= item[1] %></li>
<% end %>
</ul>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment