Skip to content

Ruby 3.1 shorthand syntax for attributes? #1083

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

Closed
mockdeep opened this issue Sep 17, 2022 · 1 comment
Closed

Ruby 3.1 shorthand syntax for attributes? #1083

mockdeep opened this issue Sep 17, 2022 · 1 comment

Comments

@mockdeep
Copy link

I'm wondering if there's any intention to support a shorthand syntax for attributes like the new hash syntax in Ruby 3.1. I.e:

data = { yabba: 'dabba', doo: 'yep' }
-.foo{ data: data }
+.foo{ data: }

It's not uncommon for us to pass down data or aria attributes in particular, so this could provide a little cleaner layout.

@k0kubun
Copy link
Member

k0kubun commented Dec 10, 2022

Fixed in v6.1.1.

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

No branches or pull requests

2 participants