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

Added support for Grape 0.10.x #36

Merged
merged 2 commits into from
Jan 13, 2015
Merged

Conversation

dblock
Copy link
Member

@dblock dblock commented Jan 13, 2015

Fixes #35, adds tests for all versions of Grape on Travis, see https://travis-ci.org/dblock/grape-active_model_serializers/builds/46861142 for an example.

if Formatter::ActiveModelSerializers.meta
if Formatter::ActiveModelSerializers.meta_key
key_option = Formatter::ActiveModelSerializers.meta_key[:meta_key]
Formatter::ActiveModelSerializers.meta_key.delete(:meta_key)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can just do key_option = Formatter::ActiveModelSerializers.meta_key.delete(:meta_key) here.

@dblock
Copy link
Member Author

dblock commented Jan 13, 2015

Updated, simpler.

@dblock
Copy link
Member Author

dblock commented Jan 13, 2015

I have another change in https://github.com/dblock/grape-active_model_serializers/tree/one-meta, will PR next, where we pass meta around with env, which is probably the right thing to do - we should not be assigning globals that belong to modules, which I suspect may cause leaks or thread-safety issues on some platforms.

@siong1987
Copy link
Member

@dblock that is awesome! thanks!

siong1987 added a commit that referenced this pull request Jan 13, 2015
Added support for Grape 0.10.x
@siong1987 siong1987 merged commit cc6389f into ruby-grape:master Jan 13, 2015
@dblock dblock deleted the grape-10 branch January 13, 2015 23:38
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.

Issue with Grape: undefined local variable or method `settings' for #<Grape::Endpoint>
2 participants