What is the proer syntax to pass data-turbolinks-track => 'reload' to a content_tag?
I want to do this:
content_tag(:link, nil, rel: rel, href: url_for(page: page != 1 ? page : nil, only_path: false), data-turbolinks-track => reload)
But this is throwing an exception :(
This is the correct syntax:
content_tag(:link, nil, rel: rel, href: url_for(page: page != 1 ? page : nil, only_path: false), data: {'turbolinks-track' => 'reload'})Creates:
<link rel="next" href="http://hipyard.dev:3000/m/toronto-area-on?page=2" data-turbolinks-track="reload">