trailblazer-rails
trailblazer-rails copied to clipboard
Feature request: decent exposure style exposing options
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
The future/new way of doing so : https://github.com/trailblazer/trailblazer-rails/pull/86
Hi! I think this one can be closed!