Skip to content

can not marshal.dump the created record. #197

snowyu opened this Issue Apr 11, 2012 · 2 comments

2 participants

snowyu commented Apr 11, 2012


  class Zoo
    after :create do |res|
       # raise error here...

  after :update do |res|
      # this is ok
DataMapper member
myabc commented Apr 11, 2012
snowyu commented Apr 11, 2012

ok, here is it.

TypeError: can't dump hash with default proc
from /lib/data_mapper/cache.rb:48:in `dump'
from /lib/data_mapper/cache.rb:48:in `block (2 levels) in included'
from dm-core-1.2.0/lib/dm-core/model/hook.rb:77:in `instance_eval'
from dm-core-1.2.0/lib/dm-core/model/hook.rb:77:in `call'
from dm-core-1.2.0/lib/dm-core/resource.rb:1144:in `block in execute_hooks_for'
from dm-core-1.2.0/lib/dm-core/resource.rb:1144:in `each'
from dm-core-1.2.0/lib/dm-core/resource.rb:1144:in `execute_hooks_for'
from dm-core-1.2.0/lib/dm-core/resource.rb:679:in `after_save_hook'
from dm-core-1.2.0/lib/dm-core/resource.rb:972:in `block in create_with_hooks'
from dm-core-1.2.0/lib/dm-core/resource.rb:967:in `catch'
from dm-core-1.2.0/lib/dm-core/resource.rb:967:in `create_with_hooks'
from dm-core-1.2.0/lib/dm-core/resource.rb:1021:in `save_self'
from dm-validations-1.2.0/lib/dm-validations.rb:54:in `save_self'
from dm-core-1.2.0/lib/dm-core/resource.rb:1006:in `block in _save'
from dm-core-1.2.0/lib/dm-core/resource.rb:1222:in `run_once'
from dm-core-1.2.0/lib/dm-core/resource.rb:1005:in `_save'
from dm-core-1.2.0/lib/dm-core/resource.rb:405:in `save'
from dm-validations-1.2.0/lib/dm-validations.rb:40:in `block in save'
from dm-validations-1.2.0/lib/dm-validations/context.rb:16:in `in_context'
from dm-validations-1.2.0/lib/dm-validations.rb:40:in `save'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.