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

Remove virtual_path_of_template. #12

Merged
merged 1 commit into from
Dec 6, 2023
Merged

Remove virtual_path_of_template. #12

merged 1 commit into from
Dec 6, 2023

Conversation

jho406
Copy link
Contributor

@jho406 jho406 commented Dec 2, 2023

This method was originally created to more easily tie a page json with a page component. It was to be used as the componentIdentifier.

A better and more maintainable approach would be to use a combination of controller_path and action for the componentIdentifier. This removes the hacky-ness of dynamically defining a method, while giving flexibility as two controller actions can render the same template while having a different componentIdentifier.

This method was originally created to more easily tie a page json with a
page component. It was to be used as the componentIdentifier.

A better and more maintainable approach would be to use a combination of
`controller_path` and `action` for the `componentIdentifier`. This
removes the hacky-ness of dynamically defining a method, while giving
flexibility as two controller actions can render the same template while
having a different componentIdentifier.
@jho406 jho406 merged commit 55ace47 into main Dec 6, 2023
10 checks passed
jho406 added a commit that referenced this pull request Dec 10, 2023
jho406 added a commit that referenced this pull request Dec 10, 2023
* Revert "Remove virtual_path_of_template. (#12)"

This reverts commit 55ace47.

* Expose method to all templates

After the revert, we'd like to rename the method and make it accessible to all
templates. The reasoning behind this is because superglue was using @virtual_path
on the html templates, which seemed like a private variable, with this change we
expose the active_template_virtual_path to everyone so we don't have to use private
instance vars elsewhere.
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.

None yet

1 participant