Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: clean up decorator context #645

Closed
wants to merge 4 commits into from

Conversation

bethesque
Copy link
Member

The original purpose of the DecoratorContext was to provide the decorators with an object that could be used as the user_options for getting things like the base URL, resource URL, resource title etc.

Unfortunately, this never panned out, as the Roar::Decorator code calls merge on the user_options object (expecting it, quite reasonably, to be a Hash), and it turns back into a Hash by the time it gets yielded into the decorator blocks.

This PR cleans up and documents that code.

@bethesque bethesque closed this Nov 24, 2023
@bethesque bethesque deleted the chore/clean-up-decorator-context branch November 24, 2023 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant