Closed javierjulio closed 11 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
70ed0b9
) 91.66% compared to head (04cee57
) 91.57%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
This is mostly a full revert of commit 1526789 which was a bad change. Empty attributes are valid HTML (e.g. boolean attributes) and should be supported in Arbre. The bad commit was for just addressing the class attribute but that applied to any attribute in HTML when it shouldn't have, even for just class. Note that if an attribute value is
nil
then it is removed. This follows same output logic to the Railstag.attributes
helper method.With this change, the generated HTML string is improved:
Prior to this change, the output for that would have been:
This will be in a major (v2) release due to being a breaking change.