trailblazer-rails icon indicating copy to clipboard operation
trailblazer-rails copied to clipboard

Feature request: decent exposure style exposing options

Open mensfeld opened this issue 8 years ago • 2 comments

Hey, not exactly sure about the implementation, but few times I had a problem that when working with nested resources I would have to fetch parent resource and the main resource and then do something in the views with both (lets say breadcrumbs + headers, etc). For now I have to fetch the result and manually assign stuff (something like that):

result = Op.call(args, params)
@root_resource = result['root_resource']
@model = result['model']

I could imagine that people that don't use cells or want to migrate but can't do all at once would love something like that (I know that for cells there's stuff but adapting systems is not that easy):

def create
  result = Op.call(args, params)
  respond_with result, expose: %w( root_resource model )
end

mensfeld avatar Jan 06 '17 11:01 mensfeld

The future/new way of doing so : https://github.com/trailblazer/trailblazer-rails/pull/86

n-rodriguez avatar Jun 18 '18 20:06 n-rodriguez

Hi! I think this one can be closed!

n-rodriguez avatar Aug 25 '18 17:08 n-rodriguez