daily pastebin goal
15%
SHARE
TWEET

Untitled

a guest May 23rd, 2018 218 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ## lib/foreign_profiles_profiler.rb
  2.  
  3. post session_path, :email => "tester@example.com", :password => "secret"
  4. user = assigns :current_user
  5. puts "current user: #{user.inspect}."
  6. puts "Is user a User?: #{user.is_a?(User).inspect}."
  7. puts "user's class: #{user.class.inspect}."
  8.  
  9. puts "user's id: #{user.id.inspect}."
  10.  
  11. ## console [plain_text]
  12.  
  13. [dfr@beta trunk]$ ./script/performance/request -n 1 lib/foreign_profiles_profiler.rb
  14. Warming up once
  15. is @current_user a user?:true.
  16. current user: #<User id: 1, name: "", salt: "86cb8af1fa40d6d4062c11c55add8e0f79afd132", created_at: "2008-11-01 18:18:09", updated_at: "2008-11-06 11:58:14", email: "tester@example.com", remember_token: nil, remember_token_expires_at: nil, crypted_password: "168a1f24b8d7cb14f14fabf7cbb7a1f3d48ee07c">.
  17. Is user a User?: false.
  18. user's class: User(id: integer, name: string, salt: string, created_at: datetime, updated_at: datetime, email: string, remember_token: string, remember_token_expires_at: datetime, crypted_password: string).
  19. lib/foreign_profiles_profiler.rb:20:in `run': undefined method `id' for #<User:0xb70ebbec> (NoMethodError)
  20.     from /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/request_profiler.rb:116:in `warmup'
  21.     from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/core_ext/benchmark.rb:8:in `realtime'
  22.     from /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/request_profiler.rb:116:in `warmup'
  23.     from /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/request_profiler.rb:91:in `run'
  24.     from /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/request_profiler.rb:83:in `run'
  25.     from /usr/local/lib/ruby/gems/1.8/gems/rails-2.1.2/lib/commands/performance/request.rb:6
  26.     from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
  27.     from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
  28.     from ./script/performance/request:3
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top