-
Notifications
You must be signed in to change notification settings - Fork 335
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Child might not be named correctly #28
Comments
Yes, I do see your point, it is introspecting the class name while it could just use the name provided. I will look into fixing this sometime soon. |
Ok awesome. I'll see if I can't hack something together also. Although it might break more than it fixed ha, jk. |
Note to self and you, here is where it needs to be changed: |
[Note to self] Make sure this fix, fixes this issue as well: #29 |
(Heads up) Might be a few days until I have a chance to get to this since the workaround is easy but obviously pull requests welcome :) |
No worries. That will give me a chance to try and create something ha. I'm like a yellow belt in code fu. |
Going to close this, not sure it's still relevant. If it is, open a new issue. |
Thanks. I actually forgot about this ticket! I'm sorry I didn't actually work on it. That was pretty irresponsible on my part. I did look at the source but ended up kind of scratching my head. I'm still trying to get used to open source projects. Anyway thanks for the project, it's a life saver. :/ |
@nesquena would you mind re-opening this ticket? I bumped up against this same issue ( |
@nesquena nope, no dice.
|
Got it, will take care of both these cases in the future, thanks for reminding me of the issue. |
Hey,
I'm not sure if this is the expected behavior but it threw me off a little bit when I first ran into it so I thought I would post it here.
I have a tour_stop that has two tour_routes. This is what my models look like.
Ok cool. Now in my awesome api::tour view I have something like this
The part to look at here, is the child :route_starting_here portion. If I leave it as is, the json produced looks like this
Notice that tour_route is not being named :tour_starting_here.. it's being named "tour_route". In order for me to get it named correctly to :tour_starting_here I need to set it's alias like ...
Which will correctly produce
Shouldn't this all ready know that I named this route_starting_here? It seems like it's pulling from the class name to set the name vs the association name which imo would make more since. Anyway, just a thought. Thanks for any input.
The text was updated successfully, but these errors were encountered: