@thibaud_denolle wrote:
Hi,
I'm using a rails 5 api that render exactly this:
{"data":[{"id":"1","type":"taxes","attributes":{"rate":0.055,"context":"whatever"}}]}
my "rate" attribute is clearly a float. In my models:
if I define "rate" attribute as float, I can't load anything, related to my taxes. And I have this message "Error: Assertion Failed: Unable to find transform for 'float'" and it looks stuck at class transformFor.
if I define "rate" attribute as string, it loads and save very wellI use JSONAPIAdapter without fancy configuration (just a namespace). I guess I could custom my serialisation but it doesn't look logic as I would like to have similar data-types in ember-data and rails. So I suppose this is not the default behaviour and I did something wrong.
If anybody can help...
Posts: 3
Participants: 2