Closed
Description
My use case is to only include possible actions on a resource.
I want to omit ones which aren't relevant, depending on the resource state.
Something like this:
link :boom do
if @object.can_go_boom?
href "the-boom-url"
end
end
Currently this results in links: {boom: nil}
but I'd prefer any links which are nil to be removed (like Hash#compact
).
Does this make sense? I'd be happy to make a PR if the idea is sound.
Metadata
Metadata
Assignees
Labels
No labels