Skip to content

Instantly share code, notes, and snippets.

@felixflores
Created November 28, 2009 12:38
Show Gist options
  • Save felixflores/244495 to your computer and use it in GitHub Desktop.
Save felixflores/244495 to your computer and use it in GitHub Desktop.
ActiveRecord::AssociationTypeMismatch in UsersController#update
Photo(#2175010700) expected, got HashWithIndifferentAccess(#2158250880)
RAILS_ROOT: /Users/felixflores86/Sites/veritas
Application Trace | Framework Trace | Full Trace
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/associations/association_proxy.rb:263:in `raise_on_type_mismatch'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/associations/has_one_association.rb:52:in `replace'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/associations.rb:1278:in `photo='
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/base.rb:2744:in `send'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/base.rb:2744:in `attributes='
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/base.rb:2740:in `each'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/base.rb:2740:in `attributes='
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/base.rb:2626:in `update_attributes'
/Users/felixflores86/Sites/veritas/app/controllers/users_controller.rb:33:in `update'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_controller/base.rb:1331:in `send'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_controller/base.rb:1331:in `perform_action_without_filters'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_controller/filters.rb:617:in `call_filters'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_controller/filters.rb:610:in `perform_action_without_benchmark'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.4/lib/active_support/core_ext/benchmark.rb:17:in `ms'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.4/lib/active_support/core_ext/benchmark.rb:17:in `ms'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_controller/rescue.rb:160:in `perform_action_without_flash'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_controller/flash.rb:146:in `perform_action'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_controller/base.rb:532:in `send'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_controller/base.rb:532:in `process_without_filters'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_controller/filters.rb:606:in `process'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_controller/base.rb:391:in `process'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_controller/base.rb:386:in `call'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_controller/routing/route_set.rb:437:in `call'
Request
Parameters:
{"commit"=>"Save",
"_method"=>"put",
"authenticity_token"=>"pwMwXpMDtAWCGyXVjVL+GJIBuXL8alV7v0SZfyepBWE=",
"id"=>"5",
"user"=>{"photo"=>{"file"=>#<File:/var/folders/8o/8o4Dcpc-GPeToiOdsDik-U+++TI/-Tmp-/RackMultipart20091128-6564-q48lvh-0>},
"password_confirmation"=>"",
"password"=>"",
"email"=>"felixflores@gmail.com"}}
Show session dump
Response
Headers:
{"Content-Type"=>"",
"Cache-Control"=>"no-cache"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment