Skip to content
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

to filter, the :only option in the context can be used #68

Closed
wants to merge 1 commit into from

Conversation

mb21
Copy link

@mb21 mb21 commented Feb 28, 2016

closes #67

@mb21
Copy link
Author

mb21 commented Feb 29, 2016

Not sure exactly why the tests are failing (NoMethodError: undefined method spec' for nil:NilClass`)...

But I just realized that e.g. context[:only][:property] will apply for all nested serializers as well in my patch, which is not the way this is supposed to work. I think the root of all my problems is that the context is shared by all serializers and somehow always merged down. Which is a pity, because I really like the rest of oat. @ismasan would you mind changing that design in favour of one where the context is just passed down as is (so usually the behaviour is the same as now). Basically replace the serializer.context.merge(context_options) with just context_options, so my introduced methods can change the context before it's passed down. Or are you married to the idea of a shared semi-global context?

@ismasan
Copy link
Owner

ismasan commented Feb 29, 2016

Hi.

I left a comment on your issue #67

@mb21 mb21 closed this Feb 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

:only option for filtering
2 participants