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
{{ message }}
This repository has been archived by the owner on Jun 11, 2022. It is now read-only.
When rendering the model as a string, the raw value is returned:
model.to_s# => "#<MyModel my_prop=\"42\">"
Instead, it should render the property value after type conversion, like so:
model.to_s# => "#<MyModel my_prop=42>"
This is a relatively minor bug. However, it can certainly cause a lot of confusion in scenarios with more complex type conversion logic (for example, converting nested hashes into a graph of modelish objects).
The Modelish::Base#to_s method is currently borrowed from the hashie base class. It should be re-implemented to support modelish-specific concepts like property types.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Given the following modelish object:
When rendering the model as a string, the raw value is returned:
Instead, it should render the property value after type conversion, like so:
This is a relatively minor bug. However, it can certainly cause a lot of confusion in scenarios with more complex type conversion logic (for example, converting nested hashes into a graph of modelish objects).
The Modelish::Base#to_s method is currently borrowed from the hashie base class. It should be re-implemented to support modelish-specific concepts like property types.
The text was updated successfully, but these errors were encountered: