You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
classArticleDecorator < Roar::DecoratorincludeRoar::JSON::JSONAPItype:articles# a property exclude worksproperty:idproperty:title# a relationship exclude does not workhas_one:author,class: Author,populator: ::Representable::FindOrInstantiatedotype:authorsproperty:idproperty:emailendend#===============================================ArticleDecorator.new(article).to_json(exclude: [:title])#worksArticleDecorator.new(article).to_json(exclude: [:author])# does not work
From @wuarmin on September 20, 2016 17:59
At http://trailblazer.to/gems/representable/3.0/api.html#include-and-exclude there's a documenation about the top-level-options include and exclude. Today I tried to exclude a has_many relationship while using Roar::JSON::JSONAPI, but can't achieve it.
Is the feature limited to properties?
Copied from original issue: trailblazer/roar#199
The text was updated successfully, but these errors were encountered: