Abusing Rails' content_for to push data attributes up the DOM | justin․searls․co
14-Jul-2024 583
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 #Abusing #Rails' #content_for #attributes #justin․searls․co https://rubyonrails.ba/link/abusing-rails-content_for-to-push-data-attributes-up-the-dom-justin-searls-co