grape-roar
grape-roar copied to clipboard
Use Roar with Grape.
I'm having nested representers as following: `notifications_representers` ** `notification_representers` **** `comment_representers` ****** `post_representers` ******** `image_representers` When I render a list of notifications with a type of comment and post title...
It is no longer encouraged to use the `multi_json` gem due to this reason: https://github.com/intridea/multi_json/pull/113#issuecomment-17668823 cc @dblock
The code causing this behavior is https://github.com/ruby-grape/grape-roar/blob/master/lib/grape/roar/representer.rb#L10 Example ``` ruby user = User.find_by(email: '[email protected]') # user => nil present user, with: User::Representer # User::Representer.ancestors => [..., Grape::Roar::Representer, ...] ``` Obviously...
Small change that seems to grant us all of the niceties of Roar's represent for free. The main thing I was running into that `Grape::Roar` does not support but that...
Hi there, In advance: Please let me know if this is the wrong place to report this issue, it might be better to report at the representable gem or grape...
Grape exposures give you `entity_name`, `exposures` and `documentation`. We can add those for out-of-the-box support for https://github.com/tim-vandecasteele/grape-swagger. ``` ruby module Grape module Roar module Representer def self.included(base) base.extend(ClassMethods) end module...
Would you consider adding support for automatically extending `object` with the appropriate representer and releasing this as a gem? Say something along these lines of: ``` ruby def call(object, env)...
In https://github.com/dblock/grape-roar/blob/master/lib/grape/roar/formatter.rb#L6, I think `MultiJson.dump` should also pass `env` as the second parameter.
See https://github.com/intridea/grape/issues/827, we want to be able to write: ``` ruby requires :spline, type: Acme::Api::Presenters::SplinePresenter ```
See https://github.com/dblock/grape-with-roar/blob/765b6fc0c117e70546161ced37da86cc0e18a8d4/api/extensions/crud_extension.rb, a simple CRUD extension that lets you write API crud in a much more elegant way. #### create ``` ruby spline = create Acme::Models::Spline, with: Acme::Api::Presenters::SplinePresenter, from: params[:spline]...