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

Detect invalid href attributes #817

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

joeldrapper
Copy link
Collaborator

@joeldrapper joeldrapper commented Oct 29, 2024

Closes #816

@joelmoss
Copy link
Contributor

Not tried this yet, but phlexible overrides the a method in order to allow passing Rails route helpers to the href. Basically in the same way that the Rails link_to helper passes it's URL argument to the url_for helper.

So I can do things like...

a(href: :some_route) { 'click me' }
a(href: article) { 'click me' }
a(href: [user, :articles]) { 'click me' }

I'm hoping that this change will not break the above 🤞

@joeldrapper
Copy link
Collaborator Author

It should be fine if you’re only passing a string up to super.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

If you pass a Hash to href, you get an error about calling downcase on it
2 participants