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

From non-controller? #4

Open
tylercollier opened this issue May 7, 2016 · 1 comment
Open

From non-controller? #4

tylercollier opened this issue May 7, 2016 · 1 comment

Comments

@tylercollier
Copy link

Great project! I just learned of JSend and am pleased to find this gem.

I'm using the Grape gem for my API, so I just return a value directly in my methods and Grape renders them for me. Thus, I don't want jsend-rails to try to render for me. To get around this, instead of calling render_jsend, I use JSend::Rails::Envelope.compute({ success: myresponse }). This works fine, but doesn't feel like it has first class support. Would you consider creating a build_jsend method? Name it what you like, but just a better way to expose JSend::Rails::Envelope.compute.

@bcm
Copy link
Contributor

bcm commented May 7, 2016

seems like a reasonable thing to do. I don't really use this library anymore, but I'd be happy to accept a patch and push a new version.

I should also merge the improvements I've made on my personal branch (and pushed to ruby gems).

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

No branches or pull requests

2 participants