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 }}
Repository navigation
addElementTransformer/extendModel is not able to distinguish different nested resources #1289
So the wheel types collection has quite some different functions as the wheels collection on the car, so when we try to map this with extend model, we'll end up with something in line of this:
Currently this will bind the detachFromCar function to all objects returned from both api's (and the swapTireType function is never bound)... Of course you could say, change the api route to wheelTypes instead of wheels, but that's not always an option.
My suggestion would be that the extendModel (/addElementTransformer) would also be to determine the path to model being extended. The way I see this, this can be done 2 ways:
So, what are your thoughts? Is there another way, if not, what would be a potential solution? I might be able to make a change and create a pull request if we can decide on a solution.
Activity
nbasov commentedon Mar 22, 2016
+1
As an quick fix you could change route case, since urls are case independent:
bostrom commentedon Oct 17, 2016
+1 for regexp matching the route name.