solnic / virtus

[DISCONTINUED ] Attributes on Steroids for Plain Old Ruby Objects
MIT License
3.77k stars 229 forks source link

default value #to_hash error #341

Closed neumachen closed 9 years ago

neumachen commented 9 years ago

Each time I try to set a default value to a class:

attribuite :some_class, Foo::SomeClass, default: proc { Foo::SomeClass }

I get this error:

Expected "Foo::SomeClass" to respond to #to_hash
neumachen commented 9 years ago

I got this to work. Just need to initialize the default value.