Abusing Rails' content_for to push data attributes up the DOM | justin․searls․co

f you use Hotwired with Rails, you probably find yourself writing a lot of data attributes. This is great, because (similar to HTMX), it makes the DOM the primary source of truth and all that, but it sometimes imposes one of several vexing constraints on Stimulus components:.
Abusing Rails' content_for to push data attributes up the DOM | justin․searls․co #ruby #rubydeveloper #rubyonrails https://rubyonrails.ba/single/abusing-rails-content_for-to-push-data-attributes-up-the-dom-justin-searls-co

Nezir Zahirovic

Contractor Ruby On Rails (8+ years) / MCPD .Net / C# / Asp.Net / CSS / SQL / (11 years)

related articles