-
Notifications
You must be signed in to change notification settings - Fork 27
Closed
Description
So I'm aware that you can do html_attributes("data-value": nil) if condition? to return "data-value" if the condition is truthy.
Is that the cleanest / only format? On reading the code, I briefly thought html_attributes("data-value") if condition? might work, but I overlooked the stringify_keys statement that means it needs to be a hash.
Would a PR to support strings, or arrays of strings, in the method be considered?
Or is this more a case of we've provided a basic clean interface to prevent too much magic producing bad HTML, so the preference is not sprinkle too much interface overloading magic in?!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Fields
Give feedbackNo fields configured for issues without a type.