Closed assembler closed 10 years ago
Hi @assembler,
Can you tell me what version of Ruby you're using? I just tried this on both ruby-2.0.0-p247 and ruby-2.1.0 with no errors.
Thanks!
It's probably unrelated but please use include Virtus.model
as Virtus::Model
is private API.
I was using ruby 2.0.0p195. Yep it was due to ruby version! Thanks for help!
@assembler ok cool :) happy virtus'ing ;)
Good to know! (I wonder if it was erroneously judging the Virtus object to be a hash...)
I'm having strange issue with virtus. If i want to pass virtus object to method which has mixture of required and optional named parameters, it throws an error. Here is the reproduction of the bug:
This will output:
Somehow
greet_person virtus_person
translates intogreet_person name: 'John'
.. The way to get around this error is to call method like this:greet_person virtus_person, {}