We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I want to respond to the specified object itself.
If you program as follows, you will get an error with no body method.
body
class BodyEntity < Grape::ENtity expose :body end get do present 'success', with: Entities::BodyEntity end
As a workaround, we currently program as follows.
class BodyEntity < Grape::ENtity expose :body do |body| body end end get do present 'success', with: Entities::BodyEntity end
Is not there a better way?
The text was updated successfully, but these errors were encountered:
If I understand you correctly, I think expose :itself, as: :body would work and is slightly prettier. Does that help?
expose :itself, as: :body
Sorry, something went wrong.
No branches or pull requests
I want to respond to the specified object itself.
If you program as follows, you will get an error with no
body
method.As a workaround, we currently program as follows.
Is not there a better way?
The text was updated successfully, but these errors were encountered: