-
Notifications
You must be signed in to change notification settings - Fork 151
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
Fixes duplicated entries when using nested fields #58
Conversation
@@ -1,7 +1,7 @@ | |||
Next Release | |||
============ | |||
|
|||
* Your contribution here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Put back the * Your contribution here
, please, for the next contributor.
Thanks a lot for fixing this. The build failed on Rubocop, use 1.9.x Ruby syntax. Please try to use |
Done :) |
Waait... a second :) The check for |
Oh true. For some reason I thought that internally we were using __nested to refer to nested fields. Now I see it's just a coincidence. |
https://github.com/intridea/grape-entity/blob/master/lib/grape_entity/entity.rb#L141 As I understand it, we can say that if there is a '' in the name, it is a nested attribute. I changed the code to check for '' instead of '_nested' |
I don't think this is correct or reliable. Why can't I have an attribute with these characters that's not nested? We should be able to add something to |
I agree. So I nuked the branch and started fresh with a test: Nerian@386f50a#diff-2f09e9dc67c5575f0172b3d0defe0e1bR110 I am not sure how to implement it though. |
#57