Skip to content

Instantly share code, notes, and snippets.

@mayra-cabrera
Created February 7, 2014 20:13
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 mayra-cabrera/8870832 to your computer and use it in GitHub Desktop.
Save mayra-cabrera/8870832 to your computer and use it in GitHub Desktop.
# Chrome
[7] pry(#<Jhsc::SurveysController>)> request.env["HTTP_ACCEPT"]
=> "*/*"
[8] pry(#<Jhsc::SurveysController>)> request.env["HTTP_ACCEPT_HEADER"]
=> nil
[9] pry(#<Jhsc::SurveysController>)> request.format
=> */*
self.formats
=> [:html,
:text,
:js,
:css,
:ics,
:csv,
:png,
:jpeg,
:gif,
:bmp,
:tiff,
:mpeg,
:xml,
:rss,
:atom,
:yaml,
:multipart_form,
:url_encoded_form,
:json,
:pdf,
:zip,
:xls]
#<ActionDispatch::Request:0x007fdd73799390
@env=
{"CONTENT_LENGTH"=>"405",
"CONTENT_TYPE"=>"application/x-www-form-urlencoded",
"GATEWAY_INTERFACE"=>"CGI/1.1",
"PATH_INFO"=>"/jhsc/survey/234464/update",
"QUERY_STRING"=>"",
"REMOTE_ADDR"=>"127.0.0.1",
"REMOTE_HOST"=>"localhost",
"REQUEST_METHOD"=>"POST",
"REQUEST_URI"=>"http://localhost:3000/jhsc/survey/234464/update",
"SCRIPT_NAME"=>"",
"SERVER_NAME"=>"localhost",
"SERVER_PORT"=>"3000",
"SERVER_PROTOCOL"=>"HTTP/1.1",
"SERVER_SOFTWARE"=>"WEBrick/1.3.1 (Ruby/1.9.3/2013-06-27)",
"HTTP_HOST"=>"localhost:3000",
"HTTP_CONNECTION"=>"keep-alive",
"HTTP_ORIGIN"=>"http://localhost:3000",
"HTTP_USER_AGENT"=>
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.107 Safari/537.36",
"HTTP_ACCEPT"=>"*/*",
"HTTP_REFERER"=>
"http://localhost:3000/flash/survey.swf?CourseID=C77&ModuleNo=SV&Lang=E&sid=234464&randomnumber=1391803789&aid=8991",
"HTTP_ACCEPT_ENCODING"=>"gzip,deflate,sdch",
"HTTP_ACCEPT_LANGUAGE"=>"en-US,en;q=0.8,es;q=0.6",
"HTTP_COOKIE"=>
"_session_id=81e343e1124750f5064fc4a867245235; remember_login_token=BAhbB1sGaQPNYAFJIiIkMmEkMTAkNjhtRElLd0VMdGZxR1pkajJ0ZjJoZQY6BkVU--e30943ce8ac8d00669e2
"rack.version"=>[1, 1],
"rack.input"=>#<StringIO:0x007fdd6d569c60>,
"rack.errors"=>#<IO:<STDERR>>,
"rack.multithread"=>false,
"rack.multiprocess"=>false,
"rack.run_once"=>false,
"rack.url_scheme"=>"http",
"HTTP_VERSION"=>"HTTP/1.1",
"REQUEST_PATH"=>"/jhsc/survey/234464/update",
"ORIGINAL_FULLPATH"=>"/jhsc/survey/234464/update",
"action_dispatch.routes"=>
#<ActionDispatch::Routing::RouteSet:0x007fdd6f7b4ba8>,
"action_dispatch.parameter_filter"=>[:password],
"action_dispatch.secret_token"=>
"b1658e1677a6b4b9bab9c62b22cdc6767f88ef53e08ede2f3431b7a526afad16f4c78d85cbbfa71ed8794a634e4730796b5f246ffd6b680092e8cb412cad6ad3",
"action_dispatch.show_exceptions"=>true,
"action_dispatch.show_detailed_exceptions"=>true,
"action_dispatch.logger"=>
#<ActiveSupport::TaggedLogging:0x007fdd6e6ce898
@logger=
#<ActiveSupport::BufferedLogger:0x007fdd6e6cec08
@log=
#<Logger:0x007fdd6e6ceb90
@default_formatter=
#<Logger::Formatter:0x007fdd6e6ceb40 @datetime_format=nil>,
@formatter=
#<Logger::SimpleFormatter:0x007fdd6e6ce8c0 @datetime_format=nil>,
@level=0,
@logdev=
#<Logger::LogDevice:0x007fdd6e6ceaa0
@dev=
#<File:/Users/MayraCabrera/Documents/Proyectos/Etherpros/eebos_rails/log/development.log>,
@filename=nil,
@mutex=
#<Logger::LogDevice::LogDeviceMutex:0x007fdd6e6cea78
@mon_count=0,
@mon_mutex=#<Mutex:0x007fdd6e6ce8e8>,
@mon_owner=nil>,
@shift_age=nil,
@shift_size=nil>,
@progname=nil>,
@log_dest=
#<File:/Users/MayraCabrera/Documents/Proyectos/Etherpros/eebos_rails/log/development.log>>,
@tags=
{#<Thread:0x007fdd6c0677b8 sleep>=>[],
#<Thread:0x007fdd6ffd3320 run>=>[]}>,
"action_dispatch.backtrace_cleaner"=>
#<Rails::BacktraceCleaner:0x007fdd74dbe0f8
@filters=
[#<Proc:0x007fdd6f7a0fb8@/Users/MayraCabrera/.rvm/gems/ruby-1.9.3-p448/gems/railties-3.2.6/lib/rails/backtrace_cleaner.rb:10>,
#<Proc:0x007fdd6f7a1d00@/Users/MayraCabrera/.rvm/gems/ruby-1.9.3-p448/gems/railties-3.2.6/lib/rails/backtrace_cleaner.rb:11>,
#<Proc:0x007fdd6f7a4208@/Users/MayraCabrera/.rvm/gems/ruby-1.9.3-p448/gems/railties-3.2.6/lib/rails/backtrace_cleaner.rb:12>,
#<Proc:0x007fdd717e91d0@/Users/MayraCabrera/.rvm/gems/ruby-1.9.3-p448/gems/railties-3.2.6/lib/rails/backtrace_cleaner.rb:26>],
@silencers=
[#<Proc:0x007fdd74b7c880@/Users/MayraCabrera/.rvm/gems/ruby-1.9.3-p448/gems/railties-3.2.6/lib/rails/backtrace_cleaner.rb:15>]>,
"rack.request.form_input"=>#<StringIO:0x007fdd6d569c60>,
"rack.request.form_hash"=>
{"json"=>
"[{\"question_id\":1,\"data\":\"YES\"},{\"question_id\":2,\"data\":\"YES\"},{\"question_id\":3,\"data\":\"YES\"},{\"question_id\":4,\"data\":\"YES\"},{\
"rack.request.form_vars"=>
"json=%5B%7B%22question%5Fid%22%3A1%2C%22data%22%3A%22YES%22%7D%2C%7B%22question%5Fid%22%3A2%2C%22data%22%3A%22YES%22%7D%2C%7B%22question%5Fid%22%3A3%2C%2
"action_dispatch.request_id"=>"a0d12baec656412402348c3e492acc71",
"action_dispatch.remote_ip"=>127.0.0.1,
"rack.session"=>
{"locale"=>:en,
"_csrf_token"=>"a6doGbtn8LzoXbF9Lhg8Tn3jnxNmq/ZD0QPnUiK3Dic=",
"cas_last_valid_ticket"=>"ST-1391803749r80EB3911DA9D73F7B0",
"cas_last_valid_ticket_store"=>false,
"warden.user.login.key"=>
["OleCore::Login", [90317], "$2a$10$68mDIKwELtfqGZdj2tf2he"]},
"rack.session.options"=>
{:path=>"/",
:domain=>nil,
:expire_after=>nil,
:secure=>false,
:httponly=>true,
:defer=>false,
:renew=>false,
:id=>"81e343e1124750f5064fc4a867245235"},
"rack.request.cookie_hash"=>
{"_session_id"=>"81e343e1124750f5064fc4a867245235",
"remember_login_token"=>
"BAhbB1sGaQPNYAFJIiIkMmEkMTAkNjhtRElLd0VMdGZxR1pkajJ0ZjJoZQY6BkVU--e30943ce8ac8d00669e2c7a55073238161880b3b"},
"rack.request.cookie_string"=>
"_session_id=81e343e1124750f5064fc4a867245235; remember_login_token=BAhbB1sGaQPNYAFJIiIkMmEkMTAkNjhtRElLd0VMdGZxR1pkajJ0ZjJoZQY6BkVU--e30943ce8ac8d00669e2
"rack.session.record"=>
#<ActiveRecord::SessionStore::Session id: 533394, session_id: "81e343e1124750f5064fc4a867245235", data: "BAh7CkkiC2xvY2FsZQY6BkVGOgdlbkkiEF9jc3JmX3Rva2VuB
"action_dispatch.request.content_type"=>application/x-www-form-urlencoded,
"warden"=>
Warden::Proxy:70294576785600 @config={:default_scope=>:login, :scope_defaults=>{}, :default_strategies=>{:login=>[:rememberable, :token_authenticatable, :
"action_dispatch.request.path_parameters"=>
{:controller=>"jhsc/surveys",
:action=>"update",
:train_session_id=>"234464"},
"action_controller.instance"=>
#<Jhsc::SurveysController:0x007fdd73799688
@_action_has_layout=true,
@_action_name="update",
@_env={...},
@_headers={"Content-Type"=>"text/html"},
@_lookup_context=
#<ActionView::LookupContext:0x007fdd73798ad0
@cache=true,
@details=
{:locale=>[:en],
:formats=>
[:html,
:text,
:js,
:css,
:ics,
:csv,
:png,
:jpeg,
:gif,
:bmp,
:tiff,
:mpeg,
:xml,
:rss,
:atom,
:yaml,
:multipart_form,
:url_encoded_form,
:json,
:pdf,
:zip,
:xls],
:handlers=>
[:erb, :builder, :arb, :coffee, :json_builder, :haml, :rabl]},
@details_key=nil,
@prefixes=["jhsc/surveys", "application"],
@rendered_format=nil,
@skip_default_locale=false,
@view_paths=
#<ActionView::PathSet:0x007fdd737988f0
@paths=
[/Users/MayraCabrera/Documents/Proyectos/Etherpros/eebos_rails/app/views,
/Users/MayraCabrera/.rvm/gems/ruby-1.9.3-p448/bundler/gems/jasminerice-b5370e3cf293/app/views,
/Users/MayraCabrera/Documents/Proyectos/Etherpros/ole_core/app/views,
/Users/MayraCabrera/.rvm/gems/ruby-1.9.3-p448/bundler/gems/infiniti_lms_api-fac29721af53/app/views,
/Users/MayraCabrera/.rvm/gems/ruby-1.9.3-p448/gems/activeadmin-0.5.0/app/views,
/Users/MayraCabrera/.rvm/gems/ruby-1.9.3-p448/gems/kaminari-0.14.1/app/views,
/Users/MayraCabrera/.rvm/gems/ruby-1.9.3-p448/gems/devise-2.1.2/app/views]>>,
@_params=
{"json"=>
"[{\"question_id\":1,\"data\":\"YES\"},{\"question_id\":2,\"data\":\"YES\"},{\"question_id\":3,\"data\":\"YES\"},{\"question_id\":4,\"data\":\"YES\"},
"controller"=>"jhsc/surveys",
"action"=>"update",
"train_session_id"=>"234464"},
@_prefixes=["jhsc/surveys", "application"],
@_request=#<ActionDispatch::Request:0x007fdd73799390 ...>,
@_response=
#<ActionDispatch::Response:0x007fdd73799340
@blank=false,
@body=[],
@cache_control={},
@etag=nil,
@header={},
@request=#<ActionDispatch::Request:0x007fdd73799390 ...>,
@sending_file=false,
@status=200>,
@_response_body=nil,
@_routes=nil,
@_status=200,
@cart_url="http://learning-cart.com/",
@current_login=
#<OleCore::Login id: 90317, email: "mayra_61@email.com", encrypted_password: "$2a$10$68mDIKwELtfqGZdj2tf2hetvuCanvkfOovBHBJueHE.k...", reset_password_to
"action_dispatch.request.request_parameters"=>
{"json"=>
"[{\"question_id\":1,\"data\":\"YES\"},{\"question_id\":2,\"data\":\"YES\"},{\"question_id\":3,\"data\":\"YES\"},{\"question_id\":4,\"data\":\"YES\"},{\
"rack.request.query_string"=>"",
"rack.request.query_hash"=>{},
"action_dispatch.request.query_parameters"=>{},
"action_dispatch.request.parameters"=>
{"json"=>
"[{\"question_id\":1,\"data\":\"YES\"},{\"question_id\":2,\"data\":\"YES\"},{\"question_id\":3,\"data\":\"YES\"},{\"question_id\":4,\"data\":\"YES\"},{\
"controller"=>"jhsc/surveys",
"action"=>"update",
"train_session_id"=>"234464"},
"action_dispatch.request.accepts"=>[*/*],
"action_dispatch.request.formats"=>[*/*]},
@filtered_parameters=
{"json"=>
"[{\"question_id\":1,\"data\":\"YES\"},{\"question_id\":2,\"data\":\"YES\"},{\"question_id\":3,\"data\":\"YES\"},{\"question_id\":4,\"data\":\"YES\"},{\"q
"controller"=>"jhsc/surveys",
"action"=>"update",
"train_session_id"=>"234464"},
@fullpath="/jhsc/survey/234464/update",
@method="POST">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment