In the Readme say than the way to do "Casting records or relations" is using: ActiveType.cast
But in 0.6.3 version rise the next error:
undefined method `Util' for ActiveType:Module
I think the documentation sample should be change to:
class User < ActiveRecord::Base
...
end
class SignUp < ActiveType::Record[User]
...
end
user = User.find(1)
sign_up = ActiveType::Util.cast(user, SignUp)
sign_up.is_a?(SignUp) # => true
In the Readme say than the way to do "Casting records or relations" is using:
ActiveType.cast
But in 0.6.3 version rise the next error:
I think the documentation sample should be change to: