You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I was in the process of porting Virtus over to RubyMotion, I noticed a peculiarity that I hadn't noticed in previous versions where one could no longer instantiate an object without passing in attributes as well.
E.G.
class User
include Virtus
attribute :name, String
end
User.new #=> UnsupportedCoercion: Object#to_string doesn't know how to coerce nil.
When I was in the process of porting Virtus over to RubyMotion, I noticed a peculiarity that I hadn't noticed in previous versions where one could no longer instantiate an object without passing in attributes as well.
E.G.
The issue arose with the addition of this line of code. The line previously looked like this.
I don't mind handling this one if you give me a strategy. Implement a NilClass coercer that returns
value
for every coercion method?The text was updated successfully, but these errors were encountered: