Created
November 15, 2011 13:22
-
-
Save tjl2/1367060 to your computer and use it in GitHub Desktop.
Examining request objects
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
ActionView::Template::Error (can't dump anonymous class Class): | |
1: <h3>Rack request env</h3> | |
2: <h3>Rails request object</h3> | |
3: <pre><%= h(@request_obj.to_yaml).gsub(" ", " ").html_safe %></pre> | |
app/views/headers/index.html.erb:3:in `_app_views_headers_index_html_erb___1006215901_77896010__270781548' |
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
class HeadersController < ApplicationController | |
def index | |
@rack_request_env = Rack::Request.new(env) | |
@request_obj = request | |
end | |
end |
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
<h3>Rack request env</h3> | |
<pre><%= h(@rack_request_env.to_yaml).gsub(" ", " ").html_safe %></pre> | |
<h3>Rails request object</h3> | |
<pre><%= h(@request_obj.to_yaml).gsub(" ", " ").html_safe %></pre> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment