solnic/virtus

default value #to_hash error

Closed this issue · 1 comments

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

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