12.1 Generating the XML Feed 11.3 Iteration F3: Limiting Access
edit app/controllers/application_controller.rb
class ApplicationController < ActionController::Base
layout "store"
#...
get /admin
Showing /home/rubys/git/awdwr/work-188/depot/app/views/layouts/store.html.erb where line #24 raised:
undefined method `items' for nil:NilClass
Extracted source (around line #24):
21: <div id="side">
22: <!-- START_HIGHLIGHT -->
23: <!-- START:hidden_div -->
24: <%= hidden_div_if(@cart.items.empty?, :id => 'cart') do %>
25: <%= render(:partial => "cart", :object => @cart) %>
26: <% end %>
27: <!-- END:hidden_div -->
Rails.root: /home/rubys/git/awdwr/work-188/depot
app/views/layouts/store.html.erb:24:in `_app_views_layouts_store_html_erb__913819814__615133798_0'
/home/rubys/git/rails/activesupport/lib/active_support/whiny_nil.rb:48:in `method_missing'
/home/rubys/git/rails/actionpack/lib/action_view/template.rb:135:in `send'
/home/rubys/git/rails/actionpack/lib/action_view/template.rb:135:in `render'
/home/rubys/git/rails/activesupport/lib/active_support/notifications.rb:54:in `instrument'
/home/rubys/git/rails/actionpack/lib/action_view/template.rb:127:in `render'
/home/rubys/git/rails/actionpack/lib/action_view/render/layouts.rb:76:in `_render_layout'
/home/rubys/git/rails/actionpack/lib/action_view/render/rendering.rb:62:in `_render_template'
/home/rubys/git/rails/activesupport/lib/active_support/notifications.rb:52:in `instrument'
/home/rubys/git/rails/activesupport/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
/home/rubys/git/rails/activesupport/lib/active_support/notifications.rb:52:in `instrument'
/home/rubys/git/rails/actionpack/lib/action_view/render/rendering.rb:56:in `_render_template'
/home/rubys/git/rails/actionpack/lib/action_view/render/rendering.rb:26:in `render'
/home/rubys/git/rails/actionpack/lib/abstract_controller/rendering.rb:114:in `_render_template'
/home/rubys/git/rails/actionpack/lib/abstract_controller/rendering.rb:108:in `render_to_body'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/renderers.rb:47:in `render_to_body'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/compatibility.rb:55:in `render_to_body'
/home/rubys/git/rails/actionpack/lib/abstract_controller/rendering.rb:101:in `render_to_string'
/home/rubys/git/rails/actionpack/lib/abstract_controller/rendering.rb:92:in `render'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/rendering.rb:17:in `render'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:40:in `render'
/home/rubys/git/rails/activesupport/lib/active_support/core_ext/benchmark.rb:5:in `ms'
/home/rubys/.rvm/rubies/ruby-1.8.8-r28862/lib/ruby/1.8/benchmark.rb:309:in `realtime'
/home/rubys/git/rails/activesupport/lib/active_support/core_ext/benchmark.rb:5:in `ms'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:40:in `render'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:78:in `cleanup_view_runtime'
/home/rubys/git/rails/activerecord/lib/active_record/railties/controller_runtime.rb:15:in `cleanup_view_runtime'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:39:in `render'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/implicit_render.rb:10:in `default_render'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/implicit_render.rb:5:in `send_action'
/home/rubys/git/rails/actionpack/lib/abstract_controller/base.rb:148:in `process_action'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/rendering.rb:11:in `process_action'
/home/rubys/git/rails/actionpack/lib/abstract_controller/callbacks.rb:18:in `process_action'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:435:in `_run__22524425__process_action__199225275__callbacks'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:404:in `send'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:404:in `_run_process_action_callbacks'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:93:in `send'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:93:in `run_callbacks'
/home/rubys/git/rails/actionpack/lib/abstract_controller/callbacks.rb:17:in `process_action'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:30:in `process_action'
/home/rubys/git/rails/activesupport/lib/active_support/notifications.rb:52:in `instrument'
/home/rubys/git/rails/activesupport/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
/home/rubys/git/rails/activesupport/lib/active_support/notifications.rb:52:in `instrument'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:29:in `process_action'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/rescue.rb:17:in `process_action'
/home/rubys/git/rails/actionpack/lib/abstract_controller/base.rb:117:in `process'
/home/rubys/git/rails/actionpack/lib/abstract_controller/rendering.rb:40:in `process'
/home/rubys/git/rails/actionpack/lib/action_controller/metal.rb:133:in `dispatch'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
/home/rubys/git/rails/actionpack/lib/action_controller/metal.rb:173:in `action'
/home/rubys/git/rails/actionpack/lib/action_dispatch/routing/route_set.rb:62:in `call'
/home/rubys/git/rails/actionpack/lib/action_dispatch/routing/route_set.rb:62:in `dispatch'
/home/rubys/git/rails/actionpack/lib/action_dispatch/routing/route_set.rb:27:in `call'
rack-mount (0.6.9) lib/rack/mount/route_set.rb:148:in `call'
rack-mount (0.6.9) lib/rack/mount/code_generation.rb:89:in `recognize'
rack-mount (0.6.9) lib/rack/mount/code_generation.rb:66:in `optimized_each'
rack-mount (0.6.9) lib/rack/mount/code_generation.rb:88:in `recognize'
rack-mount (0.6.9) lib/rack/mount/route_set.rb:139:in `call'
/home/rubys/git/rails/actionpack/lib/action_dispatch/routing/route_set.rb:492:in `call'
/home/rubys/git/rails/actionpack/lib/action_dispatch/middleware/best_standards_support.rb:8:in `call'
/home/rubys/git/rails/actionpack/lib/action_dispatch/middleware/head.rb:14:in `call'
rack (1.2.1) lib/rack/methodoverride.rb:24:in `call'
/home/rubys/git/rails/actionpack/lib/action_dispatch/middleware/params_parser.rb:21:in `call'
/home/rubys/git/rails/actionpack/lib/action_dispatch/middleware/flash.rb:177:in `call'
/home/rubys/git/rails/actionpack/lib/action_dispatch/middleware/session/abstract_store.rb:149:in `call'
/home/rubys/git/rails/actionpack/lib/action_dispatch/middleware/cookies.rb:268:in `call'
/home/rubys/git/rails/activerecord/lib/active_record/query_cache.rb:32:in `call'
/home/rubys/git/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:28:in `cache'
/home/rubys/git/rails/activerecord/lib/active_record/query_cache.rb:12:in `cache'
/home/rubys/git/rails/activerecord/lib/active_record/query_cache.rb:31:in `call'
/home/rubys/git/rails/actionpack/lib/action_dispatch/middleware/callbacks.rb:46:in `call'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:410:in `_run_call_callbacks'
/home/rubys/git/rails/actionpack/lib/action_dispatch/middleware/callbacks.rb:44:in `call'
rack (1.2.1) lib/rack/sendfile.rb:107:in `call'
/home/rubys/git/rails/actionpack/lib/action_dispatch/middleware/remote_ip.rb:48:in `call'
/home/rubys/git/rails/actionpack/lib/action_dispatch/middleware/show_exceptions.rb:48:in `call'
/home/rubys/git/rails/railties/lib/rails/rack/logger.rb:13:in `call'
rack (1.2.1) lib/rack/runtime.rb:17:in `call'
/home/rubys/git/rails/activesupport/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
rack (1.2.1) lib/rack/lock.rb:11:in `call'
rack (1.2.1) lib/rack/lock.rb:11:in `synchronize'
rack (1.2.1) lib/rack/lock.rb:11:in `call'
/home/rubys/git/rails/actionpack/lib/action_dispatch/middleware/static.rb:30:in `call'
/home/rubys/git/rails/railties/lib/rails/application.rb:168:in `call'
/home/rubys/git/rails/railties/lib/rails/application.rb:77:in `send'
/home/rubys/git/rails/railties/lib/rails/application.rb:77:in `method_missing'
/home/rubys/git/rails/railties/lib/rails/rack/log_tailer.rb:14:in `call'
rack (1.2.1) lib/rack/content_length.rb:13:in `call'
rack (1.2.1) lib/rack/handler/webrick.rb:52:in `service'
/home/rubys/.rvm/rubies/ruby-1.8.8-r28862/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
/home/rubys/.rvm/rubies/ruby-1.8.8-r28862/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
/home/rubys/.rvm/rubies/ruby-1.8.8-r28862/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
/home/rubys/.rvm/rubies/ruby-1.8.8-r28862/lib/ruby/1.8/webrick/server.rb:162
/home/rubys/git/rails/activesupport/lib/active_support/whiny_nil.rb:48:in `method_missing'
app/views/layouts/store.html.erb:24:in `_app_views_layouts_store_html_erb__913819814__615133798_0'
/home/rubys/git/rails/actionpack/lib/action_view/template.rb:135:in `send'
/home/rubys/git/rails/actionpack/lib/action_view/template.rb:135:in `render'
/home/rubys/git/rails/activesupport/lib/active_support/notifications.rb:54:in `instrument'
/home/rubys/git/rails/actionpack/lib/action_view/template.rb:127:in `render'
/home/rubys/git/rails/actionpack/lib/action_view/render/layouts.rb:76:in `_render_layout'
/home/rubys/git/rails/actionpack/lib/action_view/render/rendering.rb:62:in `_render_template'
/home/rubys/git/rails/activesupport/lib/active_support/notifications.rb:52:in `instrument'
/home/rubys/git/rails/activesupport/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
/home/rubys/git/rails/activesupport/lib/active_support/notifications.rb:52:in `instrument'
/home/rubys/git/rails/actionpack/lib/action_view/render/rendering.rb:56:in `_render_template'
/home/rubys/git/rails/actionpack/lib/action_view/render/rendering.rb:26:in `render'
/home/rubys/git/rails/actionpack/lib/abstract_controller/rendering.rb:114:in `_render_template'
/home/rubys/git/rails/actionpack/lib/abstract_controller/rendering.rb:108:in `render_to_body'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/renderers.rb:47:in `render_to_body'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/compatibility.rb:55:in `render_to_body'
/home/rubys/git/rails/actionpack/lib/abstract_controller/rendering.rb:101:in `render_to_string'
/home/rubys/git/rails/actionpack/lib/abstract_controller/rendering.rb:92:in `render'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/rendering.rb:17:in `render'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:40:in `render'
/home/rubys/git/rails/activesupport/lib/active_support/core_ext/benchmark.rb:5:in `ms'
/home/rubys/.rvm/rubies/ruby-1.8.8-r28862/lib/ruby/1.8/benchmark.rb:309:in `realtime'
/home/rubys/git/rails/activesupport/lib/active_support/core_ext/benchmark.rb:5:in `ms'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:40:in `render'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:78:in `cleanup_view_runtime'
/home/rubys/git/rails/activerecord/lib/active_record/railties/controller_runtime.rb:15:in `cleanup_view_runtime'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:39:in `render'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/implicit_render.rb:10:in `default_render'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/implicit_render.rb:5:in `send_action'
/home/rubys/git/rails/actionpack/lib/abstract_controller/base.rb:148:in `process_action'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/rendering.rb:11:in `process_action'
/home/rubys/git/rails/actionpack/lib/abstract_controller/callbacks.rb:18:in `process_action'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:435:in `_run__22524425__process_action__199225275__callbacks'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:404:in `send'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:404:in `_run_process_action_callbacks'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:93:in `send'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:93:in `run_callbacks'
/home/rubys/git/rails/actionpack/lib/abstract_controller/callbacks.rb:17:in `process_action'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:30:in `process_action'
/home/rubys/git/rails/activesupport/lib/active_support/notifications.rb:52:in `instrument'
/home/rubys/git/rails/activesupport/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
/home/rubys/git/rails/activesupport/lib/active_support/notifications.rb:52:in `instrument'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:29:in `process_action'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/rescue.rb:17:in `process_action'
/home/rubys/git/rails/actionpack/lib/abstract_controller/base.rb:117:in `process'
/home/rubys/git/rails/actionpack/lib/abstract_controller/rendering.rb:40:in `process'
/home/rubys/git/rails/actionpack/lib/action_controller/metal.rb:133:in `dispatch'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
/home/rubys/git/rails/actionpack/lib/action_controller/metal.rb:173:in `action'
/home/rubys/git/rails/actionpack/lib/action_dispatch/routing/route_set.rb:62:in `call'
/home/rubys/git/rails/actionpack/lib/action_dispatch/routing/route_set.rb:62:in `dispatch'
/home/rubys/git/rails/actionpack/lib/action_dispatch/routing/route_set.rb:27:in `call'
rack-mount (0.6.9) lib/rack/mount/route_set.rb:148:in `call'
rack-mount (0.6.9) lib/rack/mount/code_generation.rb:89:in `recognize'
rack-mount (0.6.9) lib/rack/mount/code_generation.rb:66:in `optimized_each'
rack-mount (0.6.9) lib/rack/mount/code_generation.rb:88:in `recognize'
rack-mount (0.6.9) lib/rack/mount/route_set.rb:139:in `call'
/home/rubys/git/rails/actionpack/lib/action_dispatch/routing/route_set.rb:492:in `call'
/home/rubys/git/rails/actionpack/lib/action_dispatch/middleware/best_standards_support.rb:8:in `call'
/home/rubys/git/rails/actionpack/lib/action_dispatch/middleware/head.rb:14:in `call'
rack (1.2.1) lib/rack/methodoverride.rb:24:in `call'
/home/rubys/git/rails/actionpack/lib/action_dispatch/middleware/params_parser.rb:21:in `call'
/home/rubys/git/rails/actionpack/lib/action_dispatch/middleware/flash.rb:177:in `call'
/home/rubys/git/rails/actionpack/lib/action_dispatch/middleware/session/abstract_store.rb:149:in `call'
/home/rubys/git/rails/actionpack/lib/action_dispatch/middleware/cookies.rb:268:in `call'
/home/rubys/git/rails/activerecord/lib/active_record/query_cache.rb:32:in `call'
/home/rubys/git/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:28:in `cache'
/home/rubys/git/rails/activerecord/lib/active_record/query_cache.rb:12:in `cache'
/home/rubys/git/rails/activerecord/lib/active_record/query_cache.rb:31:in `call'
/home/rubys/git/rails/actionpack/lib/action_dispatch/middleware/callbacks.rb:46:in `call'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:410:in `_run_call_callbacks'
/home/rubys/git/rails/actionpack/lib/action_dispatch/middleware/callbacks.rb:44:in `call'
rack (1.2.1) lib/rack/sendfile.rb:107:in `call'
/home/rubys/git/rails/actionpack/lib/action_dispatch/middleware/remote_ip.rb:48:in `call'
/home/rubys/git/rails/actionpack/lib/action_dispatch/middleware/show_exceptions.rb:48:in `call'
/home/rubys/git/rails/railties/lib/rails/rack/logger.rb:13:in `call'
rack (1.2.1) lib/rack/runtime.rb:17:in `call'
/home/rubys/git/rails/activesupport/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
rack (1.2.1) lib/rack/lock.rb:11:in `call'
rack (1.2.1) lib/rack/lock.rb:11:in `synchronize'
rack (1.2.1) lib/rack/lock.rb:11:in `call'
/home/rubys/git/rails/actionpack/lib/action_dispatch/middleware/static.rb:30:in `call'
/home/rubys/git/rails/railties/lib/rails/application.rb:168:in `call'
/home/rubys/git/rails/railties/lib/rails/application.rb:77:in `send'
/home/rubys/git/rails/railties/lib/rails/application.rb:77:in `method_missing'
/home/rubys/git/rails/railties/lib/rails/rack/log_tailer.rb:14:in `call'
rack (1.2.1) lib/rack/content_length.rb:13:in `call'
rack (1.2.1) lib/rack/handler/webrick.rb:52:in `service'
/home/rubys/.rvm/rubies/ruby-1.8.8-r28862/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
/home/rubys/.rvm/rubies/ruby-1.8.8-r28862/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
/home/rubys/.rvm/rubies/ruby-1.8.8-r28862/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
/home/rubys/.rvm/rubies/ruby-1.8.8-r28862/lib/ruby/1.8/webrick/server.rb:162
Parameters:
None
_csrf_token: "m4B6cL6FYXdqFKxsNNRWemSZyK989GkxuYzg8B/7qh0=" cart: #<Cart:0xb68962bc @items=[]> user_id: 1
GATEWAY_INTERFACE: "CGI/1.1" HTTP_ACCEPT: "text/html" HTTP_COOKIE: "_session_id=cb6d80eb2a253ac2ddf32d1624564db9; path=/; HttpOnly" HTTP_HOST: "localhost:3000" HTTP_VERSION: "HTTP/1.1" PATH_INFO: "/admin" QUERY_STRING: "" REMOTE_ADDR: "127.0.0.1" REMOTE_HOST: "localhost" REQUEST_METHOD: "GET" REQUEST_PATH: "/" REQUEST_URI: "http://localhost:3000/admin" SCRIPT_NAME: "" SERVER_NAME: "localhost" SERVER_PORT: "3000" SERVER_PROTOCOL: "HTTP/1.1" SERVER_SOFTWARE: "WEBrick/1.3.1 (Ruby/1.8.8/2010-08-05)" action_controller.instance: #<AdminController:0xb68787a8 @total_orders=1, @_request=#<ActionDispatch::Request:0xb6878744 @env={"action_dispatch.request.formats"=>[#<Mime::Type:0xb6fa6ffc @string="text/html", @synonyms=["application/xhtml+xml"], @symbol=:html>], "action_dispatch.request.parameters"=>{"action"=>"index", "controller"=>"admin"}, "rack.session.record"=>#<ActiveRecord::SessionStore::Session id: 3, session_id: "cb6d80eb2a253ac2ddf32d1624564db9", data: "BAh7CCIQX2NzcmZfdG9rZW4iMW00QjZjTDZGWVhkcUZLeHNOTlJ...", created_at: "2010-08-07 13:15:33", updated_at: "2010-08-07 13:15:34">, "rack.session"=>{"_csrf_token"=>"m4B6cL6FYXdqFKxsNNRWemSZyK989GkxuYzg8B/7qh0=", "cart"=>#<Cart:0xb68962bc @items=[]>, "user_id"=>1}, "HTTP_HOST"=>"localhost:3000", "HTTP_ACCEPT"=>"text/html", "SERVER_NAME"=>"localhost", "rack.request.cookie_hash"=>{"HttpOnly"=>nil, "_session_id"=>"cb6d80eb2a253ac2ddf32d1624564db9", "path"=>"/"}, "action_dispatch.remote_ip"=>#<ActionDispatch::RemoteIp::RemoteIpGetter:0xb68a567c @trusted_proxies=/(^127\.0\.0\.1$|^(10|172\.(1[6-9]|2[0-9]|30|31)|192\.168)\.)/i, @env={...}, @check_ip_spoofing=true>, "REQUEST_PATH"=>"/", "rack.url_scheme"=>"http", "REMOTE_HOST"=>"localhost", "action_dispatch.request.query_parameters"=>{}, "rack.errors"=>#<IO:0xb75e1174>, "SERVER_PROTOCOL"=>"HTTP/1.1", "action_dispatch.request.accepts"=>[#<Mime::Type:0xb6fa6ffc @string="text/html", @synonyms=["application/xhtml+xml"], @symbol=:html>], "action_dispatch.secret_token"=>"992076a47e999acfc3e674f68281bf12c154e138e9d3cfb51a9a65fe28bbf26ed6cebf88e43c6d5e17f6bc46a85c71a47253061cc9c788d0cc10c2825320e670", "rack.version"=>[1, 1], "rack.run_once"=>false, "SERVER_SOFTWARE"=>"WEBrick/1.3.1 (Ruby/1.8.8/2010-08-05)", "REMOTE_ADDR"=>"127.0.0.1", "PATH_INFO"=>"/admin", "action_dispatch.request.path_parameters"=>{:action=>"index", :controller=>"admin"}, "rack.request.cookie_string"=>"_session_id=cb6d80eb2a253ac2ddf32d1624564db9; path=/; HttpOnly", "SCRIPT_NAME"=>"", "action_dispatch.parameter_filter"=>[:password], "HTTP_VERSION"=>"HTTP/1.1", "rack.multithread"=>false, "HTTP_COOKIE"=>"_session_id=cb6d80eb2a253ac2ddf32d1624564db9; path=/; HttpOnly", "action_dispatch.request.request_parameters"=>{}, "rack.multiprocess"=>false, "REQUEST_URI"=>"http://localhost:3000/admin", "rack.request.query_hash"=>{}, "SERVER_PORT"=>"3000", "action_controller.instance"=>#<AdminController:0xb68787a8 ...>, "rack.session.options"=>{:id=>"cb6d80eb2a253ac2ddf32d1624564db9", :path=>"/", :expire_after=>nil, :domain=>nil, :secure=>false, :httponly=>true}, "REQUEST_METHOD"=>"GET", "rack.request.query_string"=>"", "action_dispatch.request.content_type"=>nil, "rack.input"=>#<StringIO:0xb68a5e88>, "QUERY_STRING"=>"", "GATEWAY_INTERFACE"=>"CGI/1.1"}, @request_method="GET", @filtered_parameters={"action"=>"index", "controller"=>"admin"}, @fullpath="/admin", @method="GET">, @_headers={"Content-Type"=>"text/html"}, @view_context_class=nil, @_response=#<ActionDispatch::Response:0xb68786e0 @sending_file=false, @body=[], @status=200, @header={}, @etag=nil, @cookie=[], @blank=false, @request=#<ActionDispatch::Request:0xb6878744 @env={"action_dispatch.request.formats"=>[#<Mime::Type:0xb6fa6ffc @string="text/html", @synonyms=["application/xhtml+xml"], @symbol=:html>], "action_dispatch.request.parameters"=>{"action"=>"index", "controller"=>"admin"}, "rack.session.record"=>#<ActiveRecord::SessionStore::Session id: 3, session_id: "cb6d80eb2a253ac2ddf32d1624564db9", data: "BAh7CCIQX2NzcmZfdG9rZW4iMW00QjZjTDZGWVhkcUZLeHNOTlJ...", created_at: "2010-08-07 13:15:33", updated_at: "2010-08-07 13:15:34">, "rack.session"=>{"_csrf_token"=>"m4B6cL6FYXdqFKxsNNRWemSZyK989GkxuYzg8B/7qh0=", "cart"=>#<Cart:0xb68962bc @items=[]>, "user_id"=>1}, "HTTP_HOST"=>"localhost:3000", "HTTP_ACCEPT"=>"text/html", "SERVER_NAME"=>"localhost", "rack.request.cookie_hash"=>{"HttpOnly"=>nil, "_session_id"=>"cb6d80eb2a253ac2ddf32d1624564db9", "path"=>"/"}, "action_dispatch.remote_ip"=>#<ActionDispatch::RemoteIp::RemoteIpGetter:0xb68a567c @trusted_proxies=/(^127\.0\.0\.1$|^(10|172\.(1[6-9]|2[0-9]|30|31)|192\.168)\.)/i, @env={...}, @check_ip_spoofing=true>, "REQUEST_PATH"=>"/", "rack.url_scheme"=>"http", "REMOTE_HOST"=>"localhost", "action_dispatch.request.query_parameters"=>{}, "rack.errors"=>#<IO:0xb75e1174>, "SERVER_PROTOCOL"=>"HTTP/1.1", "action_dispatch.request.accepts"=>[#<Mime::Type:0xb6fa6ffc @string="text/html", @synonyms=["application/xhtml+xml"], @symbol=:html>], "action_dispatch.secret_token"=>"992076a47e999acfc3e674f68281bf12c154e138e9d3cfb51a9a65fe28bbf26ed6cebf88e43c6d5e17f6bc46a85c71a47253061cc9c788d0cc10c2825320e670", "rack.version"=>[1, 1], "rack.run_once"=>false, "SERVER_SOFTWARE"=>"WEBrick/1.3.1 (Ruby/1.8.8/2010-08-05)", "REMOTE_ADDR"=>"127.0.0.1", "PATH_INFO"=>"/admin", "action_dispatch.request.path_parameters"=>{:action=>"index", :controller=>"admin"}, "rack.request.cookie_string"=>"_session_id=cb6d80eb2a253ac2ddf32d1624564db9; path=/; HttpOnly", "SCRIPT_NAME"=>"", "action_dispatch.parameter_filter"=>[:password], "HTTP_VERSION"=>"HTTP/1.1", "rack.multithread"=>false, "HTTP_COOKIE"=>"_session_id=cb6d80eb2a253ac2ddf32d1624564db9; path=/; HttpOnly", "action_dispatch.request.request_parameters"=>{}, "rack.multiprocess"=>false, "REQUEST_URI"=>"http://localhost:3000/admin", "rack.request.query_hash"=>{}, "SERVER_PORT"=>"3000", "action_controller.instance"=>#<AdminController:0xb68787a8 ...>, "rack.session.options"=>{:id=>"cb6d80eb2a253ac2ddf32d1624564db9", :path=>"/", :expire_after=>nil, :domain=>nil, :secure=>false, :httponly=>true}, "REQUEST_METHOD"=>"GET", "rack.request.query_string"=>"", "action_dispatch.request.content_type"=>nil, "rack.input"=>#<StringIO:0xb68a5e88>, "QUERY_STRING"=>"", "GATEWAY_INTERFACE"=>"CGI/1.1"}, @request_method="GET", @filtered_parameters={"action"=>"index", "controller"=>"admin"}, @fullpath="/admin", @method="GET">, @cache_control={}, @length=0, @block=nil, @writer=#<Proc:0xb6c24d0c@/home/rubys/git/rails/actionpack/lib/action_dispatch/http/response.rb:44>>, @_action_name="index", @config=#<OrderedHash {}>, @_env={"action_dispatch.request.formats"=>[#<Mime::Type:0xb6fa6ffc @string="text/html", @synonyms=["application/xhtml+xml"], @symbol=:html>], "action_dispatch.request.parameters"=>{"action"=>"index", "controller"=>"admin"}, "rack.session.record"=>#<ActiveRecord::SessionStore::Session id: 3, session_id: "cb6d80eb2a253ac2ddf32d1624564db9", data: "BAh7CCIQX2NzcmZfdG9rZW4iMW00QjZjTDZGWVhkcUZLeHNOTlJ...", created_at: "2010-08-07 13:15:33", updated_at: "2010-08-07 13:15:34">, "rack.session"=>{"_csrf_token"=>"m4B6cL6FYXdqFKxsNNRWemSZyK989GkxuYzg8B/7qh0=", "cart"=>#<Cart:0xb68962bc @items=[]>, "user_id"=>1}, "HTTP_HOST"=>"localhost:3000", "HTTP_ACCEPT"=>"text/html", "SERVER_NAME"=>"localhost", "rack.request.cookie_hash"=>{"HttpOnly"=>nil, "_session_id"=>"cb6d80eb2a253ac2ddf32d1624564db9", "path"=>"/"}, "action_dispatch.remote_ip"=>#<ActionDispatch::RemoteIp::RemoteIpGetter:0xb68a567c @trusted_proxies=/(^127\.0\.0\.1$|^(10|172\.(1[6-9]|2[0-9]|30|31)|192\.168)\.)/i, @env={...}, @check_ip_spoofing=true>, "REQUEST_PATH"=>"/", "rack.url_scheme"=>"http", "REMOTE_HOST"=>"localhost", "action_dispatch.request.query_parameters"=>{}, "rack.errors"=>#<IO:0xb75e1174>, "SERVER_PROTOCOL"=>"HTTP/1.1", "action_dispatch.request.accepts"=>[#<Mime::Type:0xb6fa6ffc @string="text/html", @synonyms=["application/xhtml+xml"], @symbol=:html>], "action_dispatch.secret_token"=>"992076a47e999acfc3e674f68281bf12c154e138e9d3cfb51a9a65fe28bbf26ed6cebf88e43c6d5e17f6bc46a85c71a47253061cc9c788d0cc10c2825320e670", "rack.version"=>[1, 1], "rack.run_once"=>false, "SERVER_SOFTWARE"=>"WEBrick/1.3.1 (Ruby/1.8.8/2010-08-05)", "REMOTE_ADDR"=>"127.0.0.1", "PATH_INFO"=>"/admin", "action_dispatch.request.path_parameters"=>{:action=>"index", :controller=>"admin"}, "rack.request.cookie_string"=>"_session_id=cb6d80eb2a253ac2ddf32d1624564db9; path=/; HttpOnly", "SCRIPT_NAME"=>"", "action_dispatch.parameter_filter"=>[:password], "HTTP_VERSION"=>"HTTP/1.1", "rack.multithread"=>false, "HTTP_COOKIE"=>"_session_id=cb6d80eb2a253ac2ddf32d1624564db9; path=/; HttpOnly", "action_dispatch.request.request_parameters"=>{}, "rack.multiprocess"=>false, "REQUEST_URI"=>"http://localhost:3000/admin", "rack.request.query_hash"=>{}, "SERVER_PORT"=>"3000", "action_controller.instance"=>#<AdminController:0xb68787a8 ...>, "rack.session.options"=>{:id=>"cb6d80eb2a253ac2ddf32d1624564db9", :path=>"/", :expire_after=>nil, :domain=>nil, :secure=>false, :httponly=>true}, "REQUEST_METHOD"=>"GET", "rack.request.query_string"=>"", "action_dispatch.request.content_type"=>nil, "rack.input"=>#<StringIO:0xb68a5e88>, "QUERY_STRING"=>"", "GATEWAY_INTERFACE"=>"CGI/1.1"}, @_status=200, @_response_body=nil, @lookup_context=#<ActionView::LookupContext:0xb68784d8 @view_paths=[#<ActionView::FileSystemResolver:0xb754b674 @caching=false, @cached={}, @path="/home/rubys/git/awdwr/work-188/depot/app/views">], @details_key=#<ActionView::LookupContext::DetailsKey:0xb69df1f0 @hash=-615581448>, @skip_default_locale=false, @details={:formats=>[:html], :handlers=>[:builder, :rjs, :rhtml, :erb, :rxml], :locale=>[:en, :en]}, @frozen_formats=true>, @action_has_layout=true> action_dispatch.parameter_filter: [:password] action_dispatch.remote_ip: #<ActionDispatch::RemoteIp::RemoteIpGetter:0xb68a567c @trusted_proxies=/(^127\.0\.0\.1$|^(10|172\.(1[6-9]|2[0-9]|30|31)|192\.168)\.)/i, @env={"action_dispatch.request.formats"=>[#<Mime::Type:0xb6fa6ffc @string="text/html", @synonyms=["application/xhtml+xml"], @symbol=:html>], "action_dispatch.request.parameters"=>{"action"=>"index", "controller"=>"admin"}, "rack.session.record"=>#<ActiveRecord::SessionStore::Session id: 3, session_id: "cb6d80eb2a253ac2ddf32d1624564db9", data: "BAh7CCIQX2NzcmZfdG9rZW4iMW00QjZjTDZGWVhkcUZLeHNOTlJ...", created_at: "2010-08-07 13:15:33", updated_at: "2010-08-07 13:15:34">, "rack.session"=>{"_csrf_token"=>"m4B6cL6FYXdqFKxsNNRWemSZyK989GkxuYzg8B/7qh0=", "cart"=>#<Cart:0xb68962bc @items=[]>, "user_id"=>1}, "HTTP_HOST"=>"localhost:3000", "HTTP_ACCEPT"=>"text/html", "SERVER_NAME"=>"localhost", "rack.request.cookie_hash"=>{"HttpOnly"=>nil, "_session_id"=>"cb6d80eb2a253ac2ddf32d1624564db9", "path"=>"/"}, "action_dispatch.remote_ip"=>#<ActionDispatch::RemoteIp::RemoteIpGetter:0xb68a567c ...>, "REQUEST_PATH"=>"/", "rack.url_scheme"=>"http", "REMOTE_HOST"=>"localhost", "action_dispatch.request.query_parameters"=>{}, "rack.errors"=>#<IO:0xb75e1174>, "SERVER_PROTOCOL"=>"HTTP/1.1", "action_dispatch.request.accepts"=>[#<Mime::Type:0xb6fa6ffc @string="text/html", @synonyms=["application/xhtml+xml"], @symbol=:html>], "action_dispatch.secret_token"=>"992076a47e999acfc3e674f68281bf12c154e138e9d3cfb51a9a65fe28bbf26ed6cebf88e43c6d5e17f6bc46a85c71a47253061cc9c788d0cc10c2825320e670", "rack.version"=>[1, 1], "rack.run_once"=>false, "SERVER_SOFTWARE"=>"WEBrick/1.3.1 (Ruby/1.8.8/2010-08-05)", "REMOTE_ADDR"=>"127.0.0.1", "PATH_INFO"=>"/admin", "action_dispatch.request.path_parameters"=>{:action=>"index", :controller=>"admin"}, "rack.request.cookie_string"=>"_session_id=cb6d80eb2a253ac2ddf32d1624564db9; path=/; HttpOnly", "SCRIPT_NAME"=>"", "action_dispatch.parameter_filter"=>[:password], "HTTP_VERSION"=>"HTTP/1.1", "rack.multithread"=>false, "HTTP_COOKIE"=>"_session_id=cb6d80eb2a253ac2ddf32d1624564db9; path=/; HttpOnly", "action_dispatch.request.request_parameters"=>{}, "rack.multiprocess"=>false, "REQUEST_URI"=>"http://localhost:3000/admin", "rack.request.query_hash"=>{}, "SERVER_PORT"=>"3000", "action_controller.instance"=>#<AdminController:0xb68787a8 @total_orders=1, @_request=#<ActionDispatch::Request:0xb6878744 @env={...}, @request_method="GET", @filtered_parameters={"action"=>"index", "controller"=>"admin"}, @fullpath="/admin", @method="GET">, @_headers={"Content-Type"=>"text/html"}, @view_context_class=nil, @_response=#<ActionDispatch::Response:0xb68786e0 @sending_file=false, @body=[], @status=200, @header={}, @etag=nil, @cookie=[], @blank=false, @request=#<ActionDispatch::Request:0xb6878744 @env={...}, @request_method="GET", @filtered_parameters={"action"=>"index", "controller"=>"admin"}, @fullpath="/admin", @method="GET">, @cache_control={}, @length=0, @block=nil, @writer=#<Proc:0xb6c24d0c@/home/rubys/git/rails/actionpack/lib/action_dispatch/http/response.rb:44>>, @_action_name="index", @config=#<OrderedHash {}>, @_env={...}, @_status=200, @_response_body=nil, @lookup_context=#<ActionView::LookupContext:0xb68784d8 @view_paths=[#<ActionView::FileSystemResolver:0xb754b674 @caching=false, @cached={}, @path="/home/rubys/git/awdwr/work-188/depot/app/views">], @details_key=#<ActionView::LookupContext::DetailsKey:0xb69df1f0 @hash=-615581448>, @skip_default_locale=false, @details={:formats=>[:html], :handlers=>[:builder, :rjs, :rhtml, :erb, :rxml], :locale=>[:en, :en]}, @frozen_formats=true>, @action_has_layout=true>, "rack.session.options"=>{:id=>"cb6d80eb2a253ac2ddf32d1624564db9", :path=>"/", :expire_after=>nil, :domain=>nil, :secure=>false, :httponly=>true}, "REQUEST_METHOD"=>"GET", "rack.request.query_string"=>"", "action_dispatch.request.content_type"=>nil, "rack.input"=>#<StringIO:0xb68a5e88>, "QUERY_STRING"=>"", "GATEWAY_INTERFACE"=>"CGI/1.1"}, @check_ip_spoofing=true> action_dispatch.request.accepts: [#<Mime::Type:0xb6fa6ffc @string="text/html", @synonyms=["application/xhtml+xml"], @symbol=:html>] action_dispatch.request.content_type: nil action_dispatch.request.formats: [#<Mime::Type:0xb6fa6ffc @string="text/html", @synonyms=["application/xhtml+xml"], @symbol=:html>] action_dispatch.request.parameters: {"action"=>"index", "controller"=>"admin"} action_dispatch.request.path_parameters: {:action=>"index", :controller=>"admin"} action_dispatch.request.query_parameters: {} action_dispatch.request.request_parameters: {} action_dispatch.secret_token: "992076a47e999acfc3e674f68281bf12c154e138e9d3cfb51a9a65fe28bbf26ed6cebf88e43c6d5e17f6bc46a85c71a47253061cc9c788d0cc10c2825320e670" rack.errors: #<IO:0xb75e1174> rack.input: #<StringIO:0xb68a5e88> rack.multiprocess: false rack.multithread: false rack.request.cookie_hash: {"HttpOnly"=>nil, "_session_id"=>"cb6d80eb2a253ac2ddf32d1624564db9", "path"=>"/"} rack.request.cookie_string: "_session_id=cb6d80eb2a253ac2ddf32d1624564db9; path=/; HttpOnly" rack.request.query_hash: {} rack.request.query_string: "" rack.run_once: false rack.session: {"_csrf_token"=>"m4B6cL6FYXdqFKxsNNRWemSZyK989GkxuYzg8B/7qh0=", "cart"=>#<Cart:0xb68962bc @items=[]>, "user_id"=>1} rack.session.options: {:id=>"cb6d80eb2a253ac2ddf32d1624564db9", :path=>"/", :expire_after=>nil, :domain=>nil, :secure=>false, :httponly=>true} rack.session.record: #<ActiveRecord::SessionStore::Session id: 3, session_id: "cb6d80eb2a253ac2ddf32d1624564db9", data: "BAh7CCIQX2NzcmZfdG9rZW4iMW00QjZjTDZGWVhkcUZLeHNOTlJ...", created_at: "2010-08-07 13:15:33", updated_at: "2010-08-07 13:15:34"> rack.url_scheme: "http" rack.version: [1, 1]
Headers:
None
get /users
Showing /home/rubys/git/awdwr/work-188/depot/app/views/layouts/store.html.erb where line #24 raised:
undefined method `items' for nil:NilClass
Extracted source (around line #24):
21: <div id="side">
22: <!-- START_HIGHLIGHT -->
23: <!-- START:hidden_div -->
24: <%= hidden_div_if(@cart.items.empty?, :id => 'cart') do %>
25: <%= render(:partial => "cart", :object => @cart) %>
26: <% end %>
27: <!-- END:hidden_div -->
Rails.root: /home/rubys/git/awdwr/work-188/depot
app/views/layouts/store.html.erb:24:in `_app_views_layouts_store_html_erb__913819814__615721478_0'
app/controllers/users_controller.rb:9:in `index'
/home/rubys/git/rails/activesupport/lib/active_support/whiny_nil.rb:48:in `method_missing'
/home/rubys/git/rails/actionpack/lib/action_view/template.rb:135:in `send'
/home/rubys/git/rails/actionpack/lib/action_view/template.rb:135:in `render'
/home/rubys/git/rails/activesupport/lib/active_support/notifications.rb:54:in `instrument'
/home/rubys/git/rails/actionpack/lib/action_view/template.rb:127:in `render'
/home/rubys/git/rails/actionpack/lib/action_view/render/layouts.rb:76:in `_render_layout'
/home/rubys/git/rails/actionpack/lib/action_view/render/rendering.rb:62:in `_render_template'
/home/rubys/git/rails/activesupport/lib/active_support/notifications.rb:52:in `instrument'
/home/rubys/git/rails/activesupport/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
/home/rubys/git/rails/activesupport/lib/active_support/notifications.rb:52:in `instrument'
/home/rubys/git/rails/actionpack/lib/action_view/render/rendering.rb:56:in `_render_template'
/home/rubys/git/rails/actionpack/lib/action_view/render/rendering.rb:26:in `render'
/home/rubys/git/rails/actionpack/lib/abstract_controller/rendering.rb:114:in `_render_template'
/home/rubys/git/rails/actionpack/lib/abstract_controller/rendering.rb:108:in `render_to_body'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/renderers.rb:47:in `render_to_body'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/compatibility.rb:55:in `render_to_body'
/home/rubys/git/rails/actionpack/lib/abstract_controller/rendering.rb:101:in `render_to_string'
/home/rubys/git/rails/actionpack/lib/abstract_controller/rendering.rb:92:in `render'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/rendering.rb:17:in `render'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:40:in `render'
/home/rubys/git/rails/activesupport/lib/active_support/core_ext/benchmark.rb:5:in `ms'
/home/rubys/.rvm/rubies/ruby-1.8.8-r28862/lib/ruby/1.8/benchmark.rb:309:in `realtime'
/home/rubys/git/rails/activesupport/lib/active_support/core_ext/benchmark.rb:5:in `ms'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:40:in `render'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:78:in `cleanup_view_runtime'
/home/rubys/git/rails/activerecord/lib/active_record/railties/controller_runtime.rb:15:in `cleanup_view_runtime'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:39:in `render'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/implicit_render.rb:10:in `default_render'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/mime_responds.rb:261:in `retrieve_response_from_mimes'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/mime_responds.rb:192:in `call'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/mime_responds.rb:192:in `respond_to'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
/home/rubys/git/rails/actionpack/lib/abstract_controller/base.rb:148:in `process_action'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/rendering.rb:11:in `process_action'
/home/rubys/git/rails/actionpack/lib/abstract_controller/callbacks.rb:18:in `process_action'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:435:in `_run__434435962__process_action__199225275__callbacks'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:404:in `send'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:404:in `_run_process_action_callbacks'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:93:in `send'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:93:in `run_callbacks'
/home/rubys/git/rails/actionpack/lib/abstract_controller/callbacks.rb:17:in `process_action'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:30:in `process_action'
/home/rubys/git/rails/activesupport/lib/active_support/notifications.rb:52:in `instrument'
/home/rubys/git/rails/activesupport/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
/home/rubys/git/rails/activesupport/lib/active_support/notifications.rb:52:in `instrument'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:29:in `process_action'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/rescue.rb:17:in `process_action'
/home/rubys/git/rails/actionpack/lib/abstract_controller/base.rb:117:in `process'
/home/rubys/git/rails/actionpack/lib/abstract_controller/rendering.rb:40:in `process'
/home/rubys/git/rails/actionpack/lib/action_controller/metal.rb:133:in `dispatch'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
/home/rubys/git/rails/actionpack/lib/action_controller/metal.rb:173:in `action'
/home/rubys/git/rails/actionpack/lib/action_dispatch/routing/route_set.rb:62:in `call'
/home/rubys/git/rails/actionpack/lib/action_dispatch/routing/route_set.rb:62:in `dispatch'
/home/rubys/git/rails/actionpack/lib/action_dispatch/routing/route_set.rb:27:in `call'
rack-mount (0.6.9) lib/rack/mount/route_set.rb:148:in `call'
rack-mount (0.6.9) lib/rack/mount/code_generation.rb:89:in `recognize'
rack-mount (0.6.9) lib/rack/mount/code_generation.rb:66:in `optimized_each'
rack-mount (0.6.9) lib/rack/mount/code_generation.rb:88:in `recognize'
rack-mount (0.6.9) lib/rack/mount/route_set.rb:139:in `call'
/home/rubys/git/rails/actionpack/lib/action_dispatch/routing/route_set.rb:492:in `call'
/home/rubys/git/rails/actionpack/lib/action_dispatch/middleware/best_standards_support.rb:8:in `call'
/home/rubys/git/rails/actionpack/lib/action_dispatch/middleware/head.rb:14:in `call'
rack (1.2.1) lib/rack/methodoverride.rb:24:in `call'
/home/rubys/git/rails/actionpack/lib/action_dispatch/middleware/params_parser.rb:21:in `call'
/home/rubys/git/rails/actionpack/lib/action_dispatch/middleware/flash.rb:177:in `call'
/home/rubys/git/rails/actionpack/lib/action_dispatch/middleware/session/abstract_store.rb:149:in `call'
/home/rubys/git/rails/actionpack/lib/action_dispatch/middleware/cookies.rb:268:in `call'
/home/rubys/git/rails/activerecord/lib/active_record/query_cache.rb:32:in `call'
/home/rubys/git/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:28:in `cache'
/home/rubys/git/rails/activerecord/lib/active_record/query_cache.rb:12:in `cache'
/home/rubys/git/rails/activerecord/lib/active_record/query_cache.rb:31:in `call'
/home/rubys/git/rails/actionpack/lib/action_dispatch/middleware/callbacks.rb:46:in `call'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:410:in `_run_call_callbacks'
/home/rubys/git/rails/actionpack/lib/action_dispatch/middleware/callbacks.rb:44:in `call'
rack (1.2.1) lib/rack/sendfile.rb:107:in `call'
/home/rubys/git/rails/actionpack/lib/action_dispatch/middleware/remote_ip.rb:48:in `call'
/home/rubys/git/rails/actionpack/lib/action_dispatch/middleware/show_exceptions.rb:48:in `call'
/home/rubys/git/rails/railties/lib/rails/rack/logger.rb:13:in `call'
rack (1.2.1) lib/rack/runtime.rb:17:in `call'
/home/rubys/git/rails/activesupport/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
rack (1.2.1) lib/rack/lock.rb:11:in `call'
rack (1.2.1) lib/rack/lock.rb:11:in `synchronize'
rack (1.2.1) lib/rack/lock.rb:11:in `call'
/home/rubys/git/rails/actionpack/lib/action_dispatch/middleware/static.rb:30:in `call'
/home/rubys/git/rails/railties/lib/rails/application.rb:168:in `call'
/home/rubys/git/rails/railties/lib/rails/application.rb:77:in `send'
/home/rubys/git/rails/railties/lib/rails/application.rb:77:in `method_missing'
/home/rubys/git/rails/railties/lib/rails/rack/log_tailer.rb:14:in `call'
rack (1.2.1) lib/rack/content_length.rb:13:in `call'
rack (1.2.1) lib/rack/handler/webrick.rb:52:in `service'
/home/rubys/.rvm/rubies/ruby-1.8.8-r28862/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
/home/rubys/.rvm/rubies/ruby-1.8.8-r28862/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
/home/rubys/.rvm/rubies/ruby-1.8.8-r28862/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
/home/rubys/.rvm/rubies/ruby-1.8.8-r28862/lib/ruby/1.8/webrick/server.rb:162
/home/rubys/git/rails/activesupport/lib/active_support/whiny_nil.rb:48:in `method_missing'
app/views/layouts/store.html.erb:24:in `_app_views_layouts_store_html_erb__913819814__615721478_0'
/home/rubys/git/rails/actionpack/lib/action_view/template.rb:135:in `send'
/home/rubys/git/rails/actionpack/lib/action_view/template.rb:135:in `render'
/home/rubys/git/rails/activesupport/lib/active_support/notifications.rb:54:in `instrument'
/home/rubys/git/rails/actionpack/lib/action_view/template.rb:127:in `render'
/home/rubys/git/rails/actionpack/lib/action_view/render/layouts.rb:76:in `_render_layout'
/home/rubys/git/rails/actionpack/lib/action_view/render/rendering.rb:62:in `_render_template'
/home/rubys/git/rails/activesupport/lib/active_support/notifications.rb:52:in `instrument'
/home/rubys/git/rails/activesupport/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
/home/rubys/git/rails/activesupport/lib/active_support/notifications.rb:52:in `instrument'
/home/rubys/git/rails/actionpack/lib/action_view/render/rendering.rb:56:in `_render_template'
/home/rubys/git/rails/actionpack/lib/action_view/render/rendering.rb:26:in `render'
/home/rubys/git/rails/actionpack/lib/abstract_controller/rendering.rb:114:in `_render_template'
/home/rubys/git/rails/actionpack/lib/abstract_controller/rendering.rb:108:in `render_to_body'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/renderers.rb:47:in `render_to_body'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/compatibility.rb:55:in `render_to_body'
/home/rubys/git/rails/actionpack/lib/abstract_controller/rendering.rb:101:in `render_to_string'
/home/rubys/git/rails/actionpack/lib/abstract_controller/rendering.rb:92:in `render'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/rendering.rb:17:in `render'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:40:in `render'
/home/rubys/git/rails/activesupport/lib/active_support/core_ext/benchmark.rb:5:in `ms'
/home/rubys/.rvm/rubies/ruby-1.8.8-r28862/lib/ruby/1.8/benchmark.rb:309:in `realtime'
/home/rubys/git/rails/activesupport/lib/active_support/core_ext/benchmark.rb:5:in `ms'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:40:in `render'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:78:in `cleanup_view_runtime'
/home/rubys/git/rails/activerecord/lib/active_record/railties/controller_runtime.rb:15:in `cleanup_view_runtime'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:39:in `render'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/implicit_render.rb:10:in `default_render'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/mime_responds.rb:261:in `retrieve_response_from_mimes'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/mime_responds.rb:192:in `call'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/mime_responds.rb:192:in `respond_to'
app/controllers/users_controller.rb:9:in `index'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
/home/rubys/git/rails/actionpack/lib/abstract_controller/base.rb:148:in `process_action'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/rendering.rb:11:in `process_action'
/home/rubys/git/rails/actionpack/lib/abstract_controller/callbacks.rb:18:in `process_action'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:435:in `_run__434435962__process_action__199225275__callbacks'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:404:in `send'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:404:in `_run_process_action_callbacks'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:93:in `send'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:93:in `run_callbacks'
/home/rubys/git/rails/actionpack/lib/abstract_controller/callbacks.rb:17:in `process_action'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:30:in `process_action'
/home/rubys/git/rails/activesupport/lib/active_support/notifications.rb:52:in `instrument'
/home/rubys/git/rails/activesupport/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
/home/rubys/git/rails/activesupport/lib/active_support/notifications.rb:52:in `instrument'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:29:in `process_action'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/rescue.rb:17:in `process_action'
/home/rubys/git/rails/actionpack/lib/abstract_controller/base.rb:117:in `process'
/home/rubys/git/rails/actionpack/lib/abstract_controller/rendering.rb:40:in `process'
/home/rubys/git/rails/actionpack/lib/action_controller/metal.rb:133:in `dispatch'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
/home/rubys/git/rails/actionpack/lib/action_controller/metal.rb:173:in `action'
/home/rubys/git/rails/actionpack/lib/action_dispatch/routing/route_set.rb:62:in `call'
/home/rubys/git/rails/actionpack/lib/action_dispatch/routing/route_set.rb:62:in `dispatch'
/home/rubys/git/rails/actionpack/lib/action_dispatch/routing/route_set.rb:27:in `call'
rack-mount (0.6.9) lib/rack/mount/route_set.rb:148:in `call'
rack-mount (0.6.9) lib/rack/mount/code_generation.rb:89:in `recognize'
rack-mount (0.6.9) lib/rack/mount/code_generation.rb:66:in `optimized_each'
rack-mount (0.6.9) lib/rack/mount/code_generation.rb:88:in `recognize'
rack-mount (0.6.9) lib/rack/mount/route_set.rb:139:in `call'
/home/rubys/git/rails/actionpack/lib/action_dispatch/routing/route_set.rb:492:in `call'
/home/rubys/git/rails/actionpack/lib/action_dispatch/middleware/best_standards_support.rb:8:in `call'
/home/rubys/git/rails/actionpack/lib/action_dispatch/middleware/head.rb:14:in `call'
rack (1.2.1) lib/rack/methodoverride.rb:24:in `call'
/home/rubys/git/rails/actionpack/lib/action_dispatch/middleware/params_parser.rb:21:in `call'
/home/rubys/git/rails/actionpack/lib/action_dispatch/middleware/flash.rb:177:in `call'
/home/rubys/git/rails/actionpack/lib/action_dispatch/middleware/session/abstract_store.rb:149:in `call'
/home/rubys/git/rails/actionpack/lib/action_dispatch/middleware/cookies.rb:268:in `call'
/home/rubys/git/rails/activerecord/lib/active_record/query_cache.rb:32:in `call'
/home/rubys/git/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:28:in `cache'
/home/rubys/git/rails/activerecord/lib/active_record/query_cache.rb:12:in `cache'
/home/rubys/git/rails/activerecord/lib/active_record/query_cache.rb:31:in `call'
/home/rubys/git/rails/actionpack/lib/action_dispatch/middleware/callbacks.rb:46:in `call'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:410:in `_run_call_callbacks'
/home/rubys/git/rails/actionpack/lib/action_dispatch/middleware/callbacks.rb:44:in `call'
rack (1.2.1) lib/rack/sendfile.rb:107:in `call'
/home/rubys/git/rails/actionpack/lib/action_dispatch/middleware/remote_ip.rb:48:in `call'
/home/rubys/git/rails/actionpack/lib/action_dispatch/middleware/show_exceptions.rb:48:in `call'
/home/rubys/git/rails/railties/lib/rails/rack/logger.rb:13:in `call'
rack (1.2.1) lib/rack/runtime.rb:17:in `call'
/home/rubys/git/rails/activesupport/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
rack (1.2.1) lib/rack/lock.rb:11:in `call'
rack (1.2.1) lib/rack/lock.rb:11:in `synchronize'
rack (1.2.1) lib/rack/lock.rb:11:in `call'
/home/rubys/git/rails/actionpack/lib/action_dispatch/middleware/static.rb:30:in `call'
/home/rubys/git/rails/railties/lib/rails/application.rb:168:in `call'
/home/rubys/git/rails/railties/lib/rails/application.rb:77:in `send'
/home/rubys/git/rails/railties/lib/rails/application.rb:77:in `method_missing'
/home/rubys/git/rails/railties/lib/rails/rack/log_tailer.rb:14:in `call'
rack (1.2.1) lib/rack/content_length.rb:13:in `call'
rack (1.2.1) lib/rack/handler/webrick.rb:52:in `service'
/home/rubys/.rvm/rubies/ruby-1.8.8-r28862/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
/home/rubys/.rvm/rubies/ruby-1.8.8-r28862/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
/home/rubys/.rvm/rubies/ruby-1.8.8-r28862/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
/home/rubys/.rvm/rubies/ruby-1.8.8-r28862/lib/ruby/1.8/webrick/server.rb:162
Parameters:
None
_csrf_token: "m4B6cL6FYXdqFKxsNNRWemSZyK989GkxuYzg8B/7qh0=" cart: #<Cart:0xb6a0b4f8 @items=[]> user_id: 1
GATEWAY_INTERFACE: "CGI/1.1" HTTP_ACCEPT: "text/html" HTTP_COOKIE: "_session_id=cb6d80eb2a253ac2ddf32d1624564db9; path=/; HttpOnly" HTTP_HOST: "localhost:3000" HTTP_VERSION: "HTTP/1.1" PATH_INFO: "/users" QUERY_STRING: "" REMOTE_ADDR: "127.0.0.1" REMOTE_HOST: "localhost" REQUEST_METHOD: "GET" REQUEST_PATH: "/" REQUEST_URI: "http://localhost:3000/users" SCRIPT_NAME: "" SERVER_NAME: "localhost" SERVER_PORT: "3000" SERVER_PROTOCOL: "HTTP/1.1" SERVER_SOFTWARE: "WEBrick/1.3.1 (Ruby/1.8.8/2010-08-05)" action_controller.instance: #<UsersController:0xb69d20b8 @_request=#<ActionDispatch::Request:0xb69d1f8c @env={"action_dispatch.request.formats"=>[#<Mime::Type:0xb6fa6ffc @string="text/html", @synonyms=["application/xhtml+xml"], @symbol=:html>], "action_dispatch.request.parameters"=>{"action"=>"index", "controller"=>"users"}, "rack.session.record"=>#<ActiveRecord::SessionStore::Session id: 3, session_id: "cb6d80eb2a253ac2ddf32d1624564db9", data: "BAh7CCIQX2NzcmZfdG9rZW4iMW00QjZjTDZGWVhkcUZLeHNOTlJ...", created_at: "2010-08-07 13:15:33", updated_at: "2010-08-07 13:15:34">, "rack.session"=>{"_csrf_token"=>"m4B6cL6FYXdqFKxsNNRWemSZyK989GkxuYzg8B/7qh0=", "cart"=>#<Cart:0xb6a0b4f8 @items=[]>, "user_id"=>1}, "HTTP_HOST"=>"localhost:3000", "HTTP_ACCEPT"=>"text/html", "SERVER_NAME"=>"localhost", "rack.request.cookie_hash"=>{"HttpOnly"=>nil, "_session_id"=>"cb6d80eb2a253ac2ddf32d1624564db9", "path"=>"/"}, "action_dispatch.remote_ip"=>#<ActionDispatch::RemoteIp::RemoteIpGetter:0xb6a2617c @trusted_proxies=/(^127\.0\.0\.1$|^(10|172\.(1[6-9]|2[0-9]|30|31)|192\.168)\.)/i, @env={...}, @check_ip_spoofing=true>, "REQUEST_PATH"=>"/", "rack.url_scheme"=>"http", "REMOTE_HOST"=>"localhost", "action_dispatch.request.query_parameters"=>{}, "rack.errors"=>#<IO:0xb75e1174>, "SERVER_PROTOCOL"=>"HTTP/1.1", "action_dispatch.request.symbolized_path_parameters"=>{:action=>"index", :controller=>"users"}, "action_dispatch.request.accepts"=>[#<Mime::Type:0xb6fa6ffc @string="text/html", @synonyms=["application/xhtml+xml"], @symbol=:html>], "action_dispatch.secret_token"=>"992076a47e999acfc3e674f68281bf12c154e138e9d3cfb51a9a65fe28bbf26ed6cebf88e43c6d5e17f6bc46a85c71a47253061cc9c788d0cc10c2825320e670", "rack.version"=>[1, 1], "rack.run_once"=>false, "SERVER_SOFTWARE"=>"WEBrick/1.3.1 (Ruby/1.8.8/2010-08-05)", "REMOTE_ADDR"=>"127.0.0.1", "PATH_INFO"=>"/users", "action_dispatch.request.path_parameters"=>{:action=>"index", :controller=>"users"}, "rack.request.cookie_string"=>"_session_id=cb6d80eb2a253ac2ddf32d1624564db9; path=/; HttpOnly", "SCRIPT_NAME"=>"", "action_dispatch.parameter_filter"=>[:password], "HTTP_VERSION"=>"HTTP/1.1", "rack.multithread"=>false, "HTTP_COOKIE"=>"_session_id=cb6d80eb2a253ac2ddf32d1624564db9; path=/; HttpOnly", "action_dispatch.request.request_parameters"=>{}, "rack.multiprocess"=>false, "REQUEST_URI"=>"http://localhost:3000/users", "rack.request.query_hash"=>{}, "SERVER_PORT"=>"3000", "action_controller.instance"=>#<UsersController:0xb69d20b8 ...>, "rack.session.options"=>{:id=>"cb6d80eb2a253ac2ddf32d1624564db9", :path=>"/", :expire_after=>nil, :domain=>nil, :secure=>false, :httponly=>true}, "REQUEST_METHOD"=>"GET", "action_dispatch.request.flash_hash"=>{}, "rack.request.query_string"=>"", "action_dispatch.request.content_type"=>nil, "rack.input"=>#<StringIO:0xb6a26974>, "QUERY_STRING"=>"", "GATEWAY_INTERFACE"=>"CGI/1.1"}, @request_method="GET", @filtered_parameters={"action"=>"index", "controller"=>"users"}, @fullpath="/users", @method="GET">, @_headers={"Content-Type"=>"text/html"}, @view_context_class=nil, @_response=#<ActionDispatch::Response:0xb69d1cf8 @sending_file=false, @body=[], @status=200, @header={}, @etag=nil, @cookie=[], @blank=false, @content_type="text/html", @request=#<ActionDispatch::Request:0xb69d1f8c @env={"action_dispatch.request.formats"=>[#<Mime::Type:0xb6fa6ffc @string="text/html", @synonyms=["application/xhtml+xml"], @symbol=:html>], "action_dispatch.request.parameters"=>{"action"=>"index", "controller"=>"users"}, "rack.session.record"=>#<ActiveRecord::SessionStore::Session id: 3, session_id: "cb6d80eb2a253ac2ddf32d1624564db9", data: "BAh7CCIQX2NzcmZfdG9rZW4iMW00QjZjTDZGWVhkcUZLeHNOTlJ...", created_at: "2010-08-07 13:15:33", updated_at: "2010-08-07 13:15:34">, "rack.session"=>{"_csrf_token"=>"m4B6cL6FYXdqFKxsNNRWemSZyK989GkxuYzg8B/7qh0=", "cart"=>#<Cart:0xb6a0b4f8 @items=[]>, "user_id"=>1}, "HTTP_HOST"=>"localhost:3000", "HTTP_ACCEPT"=>"text/html", "SERVER_NAME"=>"localhost", "rack.request.cookie_hash"=>{"HttpOnly"=>nil, "_session_id"=>"cb6d80eb2a253ac2ddf32d1624564db9", "path"=>"/"}, "action_dispatch.remote_ip"=>#<ActionDispatch::RemoteIp::RemoteIpGetter:0xb6a2617c @trusted_proxies=/(^127\.0\.0\.1$|^(10|172\.(1[6-9]|2[0-9]|30|31)|192\.168)\.)/i, @env={...}, @check_ip_spoofing=true>, "REQUEST_PATH"=>"/", "rack.url_scheme"=>"http", "REMOTE_HOST"=>"localhost", "action_dispatch.request.query_parameters"=>{}, "rack.errors"=>#<IO:0xb75e1174>, "SERVER_PROTOCOL"=>"HTTP/1.1", "action_dispatch.request.symbolized_path_parameters"=>{:action=>"index", :controller=>"users"}, "action_dispatch.request.accepts"=>[#<Mime::Type:0xb6fa6ffc @string="text/html", @synonyms=["application/xhtml+xml"], @symbol=:html>], "action_dispatch.secret_token"=>"992076a47e999acfc3e674f68281bf12c154e138e9d3cfb51a9a65fe28bbf26ed6cebf88e43c6d5e17f6bc46a85c71a47253061cc9c788d0cc10c2825320e670", "rack.version"=>[1, 1], "rack.run_once"=>false, "SERVER_SOFTWARE"=>"WEBrick/1.3.1 (Ruby/1.8.8/2010-08-05)", "REMOTE_ADDR"=>"127.0.0.1", "PATH_INFO"=>"/users", "action_dispatch.request.path_parameters"=>{:action=>"index", :controller=>"users"}, "rack.request.cookie_string"=>"_session_id=cb6d80eb2a253ac2ddf32d1624564db9; path=/; HttpOnly", "SCRIPT_NAME"=>"", "action_dispatch.parameter_filter"=>[:password], "HTTP_VERSION"=>"HTTP/1.1", "rack.multithread"=>false, "HTTP_COOKIE"=>"_session_id=cb6d80eb2a253ac2ddf32d1624564db9; path=/; HttpOnly", "action_dispatch.request.request_parameters"=>{}, "rack.multiprocess"=>false, "REQUEST_URI"=>"http://localhost:3000/users", "rack.request.query_hash"=>{}, "SERVER_PORT"=>"3000", "action_controller.instance"=>#<UsersController:0xb69d20b8 ...>, "rack.session.options"=>{:id=>"cb6d80eb2a253ac2ddf32d1624564db9", :path=>"/", :expire_after=>nil, :domain=>nil, :secure=>false, :httponly=>true}, "REQUEST_METHOD"=>"GET", "action_dispatch.request.flash_hash"=>{}, "rack.request.query_string"=>"", "action_dispatch.request.content_type"=>nil, "rack.input"=>#<StringIO:0xb6a26974>, "QUERY_STRING"=>"", "GATEWAY_INTERFACE"=>"CGI/1.1"}, @request_method="GET", @filtered_parameters={"action"=>"index", "controller"=>"users"}, @fullpath="/users", @method="GET">, @cache_control={}, @length=0, @block=nil, @writer=#<Proc:0xb6c24d0c@/home/rubys/git/rails/actionpack/lib/action_dispatch/http/response.rb:44>>, @users=[#<User id: 1, name: "dave", hashed_password: "bfe4f65894cd56a752d67d3c32e8efc1efa298f9", salt: "-6150830180.669887184440239", created_at: "2010-08-07 13:15:24", updated_at: "2010-08-07 13:15:24">], @_action_name="index", @config=#<OrderedHash {}>, @_env={"action_dispatch.request.formats"=>[#<Mime::Type:0xb6fa6ffc @string="text/html", @synonyms=["application/xhtml+xml"], @symbol=:html>], "action_dispatch.request.parameters"=>{"action"=>"index", "controller"=>"users"}, "rack.session.record"=>#<ActiveRecord::SessionStore::Session id: 3, session_id: "cb6d80eb2a253ac2ddf32d1624564db9", data: "BAh7CCIQX2NzcmZfdG9rZW4iMW00QjZjTDZGWVhkcUZLeHNOTlJ...", created_at: "2010-08-07 13:15:33", updated_at: "2010-08-07 13:15:34">, "rack.session"=>{"_csrf_token"=>"m4B6cL6FYXdqFKxsNNRWemSZyK989GkxuYzg8B/7qh0=", "cart"=>#<Cart:0xb6a0b4f8 @items=[]>, "user_id"=>1}, "HTTP_HOST"=>"localhost:3000", "HTTP_ACCEPT"=>"text/html", "SERVER_NAME"=>"localhost", "rack.request.cookie_hash"=>{"HttpOnly"=>nil, "_session_id"=>"cb6d80eb2a253ac2ddf32d1624564db9", "path"=>"/"}, "action_dispatch.remote_ip"=>#<ActionDispatch::RemoteIp::RemoteIpGetter:0xb6a2617c @trusted_proxies=/(^127\.0\.0\.1$|^(10|172\.(1[6-9]|2[0-9]|30|31)|192\.168)\.)/i, @env={...}, @check_ip_spoofing=true>, "REQUEST_PATH"=>"/", "rack.url_scheme"=>"http", "REMOTE_HOST"=>"localhost", "action_dispatch.request.query_parameters"=>{}, "rack.errors"=>#<IO:0xb75e1174>, "SERVER_PROTOCOL"=>"HTTP/1.1", "action_dispatch.request.symbolized_path_parameters"=>{:action=>"index", :controller=>"users"}, "action_dispatch.request.accepts"=>[#<Mime::Type:0xb6fa6ffc @string="text/html", @synonyms=["application/xhtml+xml"], @symbol=:html>], "action_dispatch.secret_token"=>"992076a47e999acfc3e674f68281bf12c154e138e9d3cfb51a9a65fe28bbf26ed6cebf88e43c6d5e17f6bc46a85c71a47253061cc9c788d0cc10c2825320e670", "rack.version"=>[1, 1], "rack.run_once"=>false, "SERVER_SOFTWARE"=>"WEBrick/1.3.1 (Ruby/1.8.8/2010-08-05)", "REMOTE_ADDR"=>"127.0.0.1", "PATH_INFO"=>"/users", "action_dispatch.request.path_parameters"=>{:action=>"index", :controller=>"users"}, "rack.request.cookie_string"=>"_session_id=cb6d80eb2a253ac2ddf32d1624564db9; path=/; HttpOnly", "SCRIPT_NAME"=>"", "action_dispatch.parameter_filter"=>[:password], "HTTP_VERSION"=>"HTTP/1.1", "rack.multithread"=>false, "HTTP_COOKIE"=>"_session_id=cb6d80eb2a253ac2ddf32d1624564db9; path=/; HttpOnly", "action_dispatch.request.request_parameters"=>{}, "rack.multiprocess"=>false, "REQUEST_URI"=>"http://localhost:3000/users", "rack.request.query_hash"=>{}, "SERVER_PORT"=>"3000", "action_controller.instance"=>#<UsersController:0xb69d20b8 ...>, "rack.session.options"=>{:id=>"cb6d80eb2a253ac2ddf32d1624564db9", :path=>"/", :expire_after=>nil, :domain=>nil, :secure=>false, :httponly=>true}, "REQUEST_METHOD"=>"GET", "action_dispatch.request.flash_hash"=>{}, "rack.request.query_string"=>"", "action_dispatch.request.content_type"=>nil, "rack.input"=>#<StringIO:0xb6a26974>, "QUERY_STRING"=>"", "GATEWAY_INTERFACE"=>"CGI/1.1"}, @_status=200, @_response_body=nil, @lookup_context=#<ActionView::LookupContext:0xb69d17e4 @view_paths=[#<ActionView::FileSystemResolver:0xb754b674 @caching=false, @cached={}, @path="/home/rubys/git/awdwr/work-188/depot/app/views">], @details_key=#<ActionView::LookupContext::DetailsKey:0xb69df1f0 @hash=-615581448>, @skip_default_locale=false, @details={:formats=>[:html], :handlers=>[:builder, :rjs, :rhtml, :erb, :rxml], :locale=>[:en, :en]}, @frozen_formats=true>, @action_has_layout=true> action_dispatch.parameter_filter: [:password] action_dispatch.remote_ip: #<ActionDispatch::RemoteIp::RemoteIpGetter:0xb6a2617c @trusted_proxies=/(^127\.0\.0\.1$|^(10|172\.(1[6-9]|2[0-9]|30|31)|192\.168)\.)/i, @env={"action_dispatch.request.formats"=>[#<Mime::Type:0xb6fa6ffc @string="text/html", @synonyms=["application/xhtml+xml"], @symbol=:html>], "action_dispatch.request.parameters"=>{"action"=>"index", "controller"=>"users"}, "rack.session.record"=>#<ActiveRecord::SessionStore::Session id: 3, session_id: "cb6d80eb2a253ac2ddf32d1624564db9", data: "BAh7CCIQX2NzcmZfdG9rZW4iMW00QjZjTDZGWVhkcUZLeHNOTlJ...", created_at: "2010-08-07 13:15:33", updated_at: "2010-08-07 13:15:34">, "rack.session"=>{"_csrf_token"=>"m4B6cL6FYXdqFKxsNNRWemSZyK989GkxuYzg8B/7qh0=", "cart"=>#<Cart:0xb6a0b4f8 @items=[]>, "user_id"=>1}, "HTTP_HOST"=>"localhost:3000", "HTTP_ACCEPT"=>"text/html", "SERVER_NAME"=>"localhost", "rack.request.cookie_hash"=>{"HttpOnly"=>nil, "_session_id"=>"cb6d80eb2a253ac2ddf32d1624564db9", "path"=>"/"}, "action_dispatch.remote_ip"=>#<ActionDispatch::RemoteIp::RemoteIpGetter:0xb6a2617c ...>, "REQUEST_PATH"=>"/", "rack.url_scheme"=>"http", "REMOTE_HOST"=>"localhost", "action_dispatch.request.query_parameters"=>{}, "rack.errors"=>#<IO:0xb75e1174>, "SERVER_PROTOCOL"=>"HTTP/1.1", "action_dispatch.request.symbolized_path_parameters"=>{:action=>"index", :controller=>"users"}, "action_dispatch.request.accepts"=>[#<Mime::Type:0xb6fa6ffc @string="text/html", @synonyms=["application/xhtml+xml"], @symbol=:html>], "action_dispatch.secret_token"=>"992076a47e999acfc3e674f68281bf12c154e138e9d3cfb51a9a65fe28bbf26ed6cebf88e43c6d5e17f6bc46a85c71a47253061cc9c788d0cc10c2825320e670", "rack.version"=>[1, 1], "rack.run_once"=>false, "SERVER_SOFTWARE"=>"WEBrick/1.3.1 (Ruby/1.8.8/2010-08-05)", "REMOTE_ADDR"=>"127.0.0.1", "PATH_INFO"=>"/users", "action_dispatch.request.path_parameters"=>{:action=>"index", :controller=>"users"}, "rack.request.cookie_string"=>"_session_id=cb6d80eb2a253ac2ddf32d1624564db9; path=/; HttpOnly", "SCRIPT_NAME"=>"", "action_dispatch.parameter_filter"=>[:password], "HTTP_VERSION"=>"HTTP/1.1", "rack.multithread"=>false, "HTTP_COOKIE"=>"_session_id=cb6d80eb2a253ac2ddf32d1624564db9; path=/; HttpOnly", "action_dispatch.request.request_parameters"=>{}, "rack.multiprocess"=>false, "REQUEST_URI"=>"http://localhost:3000/users", "rack.request.query_hash"=>{}, "SERVER_PORT"=>"3000", "action_controller.instance"=>#<UsersController:0xb69d20b8 @_request=#<ActionDispatch::Request:0xb69d1f8c @env={...}, @request_method="GET", @filtered_parameters={"action"=>"index", "controller"=>"users"}, @fullpath="/users", @method="GET">, @_headers={"Content-Type"=>"text/html"}, @view_context_class=nil, @_response=#<ActionDispatch::Response:0xb69d1cf8 @sending_file=false, @body=[], @status=200, @header={}, @etag=nil, @cookie=[], @blank=false, @content_type="text/html", @request=#<ActionDispatch::Request:0xb69d1f8c @env={...}, @request_method="GET", @filtered_parameters={"action"=>"index", "controller"=>"users"}, @fullpath="/users", @method="GET">, @cache_control={}, @length=0, @block=nil, @writer=#<Proc:0xb6c24d0c@/home/rubys/git/rails/actionpack/lib/action_dispatch/http/response.rb:44>>, @users=[#<User id: 1, name: "dave", hashed_password: "bfe4f65894cd56a752d67d3c32e8efc1efa298f9", salt: "-6150830180.669887184440239", created_at: "2010-08-07 13:15:24", updated_at: "2010-08-07 13:15:24">], @_action_name="index", @config=#<OrderedHash {}>, @_env={...}, @_status=200, @_response_body=nil, @lookup_context=#<ActionView::LookupContext:0xb69d17e4 @view_paths=[#<ActionView::FileSystemResolver:0xb754b674 @caching=false, @cached={}, @path="/home/rubys/git/awdwr/work-188/depot/app/views">], @details_key=#<ActionView::LookupContext::DetailsKey:0xb69df1f0 @hash=-615581448>, @skip_default_locale=false, @details={:formats=>[:html], :handlers=>[:builder, :rjs, :rhtml, :erb, :rxml], :locale=>[:en, :en]}, @frozen_formats=true>, @action_has_layout=true>, "rack.session.options"=>{:id=>"cb6d80eb2a253ac2ddf32d1624564db9", :path=>"/", :expire_after=>nil, :domain=>nil, :secure=>false, :httponly=>true}, "REQUEST_METHOD"=>"GET", "action_dispatch.request.flash_hash"=>{}, "rack.request.query_string"=>"", "action_dispatch.request.content_type"=>nil, "rack.input"=>#<StringIO:0xb6a26974>, "QUERY_STRING"=>"", "GATEWAY_INTERFACE"=>"CGI/1.1"}, @check_ip_spoofing=true> action_dispatch.request.accepts: [#<Mime::Type:0xb6fa6ffc @string="text/html", @synonyms=["application/xhtml+xml"], @symbol=:html>] action_dispatch.request.content_type: nil action_dispatch.request.flash_hash: {} action_dispatch.request.formats: [#<Mime::Type:0xb6fa6ffc @string="text/html", @synonyms=["application/xhtml+xml"], @symbol=:html>] action_dispatch.request.parameters: {"action"=>"index", "controller"=>"users"} action_dispatch.request.path_parameters: {:action=>"index", :controller=>"users"} action_dispatch.request.query_parameters: {} action_dispatch.request.request_parameters: {} action_dispatch.request.symbolized_path_parameters: {:action=>"index", :controller=>"users"} action_dispatch.secret_token: "992076a47e999acfc3e674f68281bf12c154e138e9d3cfb51a9a65fe28bbf26ed6cebf88e43c6d5e17f6bc46a85c71a47253061cc9c788d0cc10c2825320e670" rack.errors: #<IO:0xb75e1174> rack.input: #<StringIO:0xb6a26974> rack.multiprocess: false rack.multithread: false rack.request.cookie_hash: {"HttpOnly"=>nil, "_session_id"=>"cb6d80eb2a253ac2ddf32d1624564db9", "path"=>"/"} rack.request.cookie_string: "_session_id=cb6d80eb2a253ac2ddf32d1624564db9; path=/; HttpOnly" rack.request.query_hash: {} rack.request.query_string: "" rack.run_once: false rack.session: {"_csrf_token"=>"m4B6cL6FYXdqFKxsNNRWemSZyK989GkxuYzg8B/7qh0=", "cart"=>#<Cart:0xb6a0b4f8 @items=[]>, "user_id"=>1} rack.session.options: {:id=>"cb6d80eb2a253ac2ddf32d1624564db9", :path=>"/", :expire_after=>nil, :domain=>nil, :secure=>false, :httponly=>true} rack.session.record: #<ActiveRecord::SessionStore::Session id: 3, session_id: "cb6d80eb2a253ac2ddf32d1624564db9", data: "BAh7CCIQX2NzcmZfdG9rZW4iMW00QjZjTDZGWVhkcUZLeHNOTlJ...", created_at: "2010-08-07 13:15:33", updated_at: "2010-08-07 13:15:34"> rack.url_scheme: "http" rack.version: [1, 1]
Headers:
None
edit app/views/layouts/store.html.erb
<% if @cart %>
<%= hidden_div_if(@cart.items.empty?, :id => 'cart') do %>
<%= render(:partial => "cart", :object => @cart) %>
<% end %>
<% end %>
get /admin
get /users
rm app/views/layouts/products.html.erb
rm: cannot remove `app/views/layouts/products.html.erb': No such file or directory
rm app/views/layouts/users.html.erb
rm: cannot remove `app/views/layouts/users.html.erb': No such file or directory
rm app/views/layouts/orders.html.erb
rm: cannot remove `app/views/layouts/orders.html.erb': No such file or directory
get /users
edit app/models/user.rb
require 'digest/sha1'
class User < ActiveRecord::Base
validates_presence_of :name
validates_uniqueness_of :name
attr_accessor :password_confirmation
validates_confirmation_of :password
validate :password_non_blank
def self.authenticate(name, password)
user = self.find_by_name(name)
if user
expected_password = encrypted_password(password, user.salt)
if user.hashed_password != expected_password
user = nil
end
end
user
end
# 'password' is a virtual attribute
def password
@password
end
def password=(pwd)
@password = pwd
return if pwd.blank?
create_new_salt
self.hashed_password = User.encrypted_password(self.password, self.salt)
end
after_destroy :ensure_an_admin_remains
def ensure_an_admin_remains
if User.count.zero?
raise "Can't delete last user"
end
end
private
def password_non_blank
errors.add(:password, "Missing password") if hashed_password.blank?
end
def create_new_salt
self.salt = self.object_id.to_s + rand.to_s
end
def self.encrypted_password(password, salt)
string_to_hash = password + "wibble" + salt
Digest::SHA1.hexdigest(string_to_hash)
end
end
edit app/controllers/users_controller.rb
class UsersController < ApplicationController
# GET /users
# GET /users.xml
def index
@users = User.all(:order => :name)
respond_to do |format|
format.html # index.html.erb
format.xml { render :xml => @users }
end
end
# GET /users/1
# GET /users/1.xml
def show
@user = User.find(params[:id])
respond_to do |format|
format.html # show.html.erb
format.xml { render :xml => @user }
end
end
# GET /users/new
# GET /users/new.xml
def new
@user = User.new
respond_to do |format|
format.html # new.html.erb
format.xml { render :xml => @user }
end
end
# GET /users/1/edit
def edit
@user = User.find(params[:id])
end
# POST /users
# POST /users.xml
def create
@user = User.new(params[:user])
respond_to do |format|
if @user.save
format.html { redirect_to(users_url,
:notice => "User #{@user.name} was successfully created.") }
format.xml { render :xml => @user, :status => :created,
:location => @user }
else
format.html { render :action => "new" }
format.xml { render :xml => @user.errors,
:status => :unprocessable_entity }
end
end
end
# PUT /users/1
# PUT /users/1.xml
def update
@user = User.find(params[:id])
respond_to do |format|
if @user.update_attributes(params[:user])
format.html { redirect_to(users_url,
:notice => "User #{@user.name} was successfully updated.") }
format.xml { head :ok }
else
format.html { render :action => "edit" }
format.xml { render :xml => @user.errors,
:status => :unprocessable_entity }
end
end
end
# DELETE /users/1
# DELETE /users/1.xml
def destroy
@user = User.find(params[:id])
begin
@user.destroy
flash[:notice] = "User #{@user.name} deleted"
rescue Exception => e
flash[:notice] = e.message
end
respond_to do |format|
format.html { redirect_to(users_url) }
format.xml { head :ok }
end
end
end
edit app/controllers/store_controller.rb
def find_cart
@cart = (session[:cart] ||= Cart.new)
end
edit app/controllers/store_controller.rb
before_filter :find_cart, :except => :empty_cart
echo "Product.new" | IRBRC=tmp/irbrc rails console
Loading development environment (Rails 3.0.0.rc)
>> Product.new
=> #<Product id: nil, title: nil, description: nil, image_url: nil, created_at: nil, updated_at: nil, price: #<BigDecimal:b6f3abf4,'0.0',4(8)>>
>>
12.1 Generating the XML Feed 11.3 Iteration F3: Limiting Access