I'm trying to pass two parameters, data-no-turbolinks
and mobile
This works:
(1) %a{href: "#{test_path}", data: { no: { turbolink: true }}} %span Test
which translates to
<a data-no-turbolink href='/test'> <span>Test</span></a>
Now I need to add one parameter to this link: mobile
All of the following didn't work!
(1) %a{href: "", mobile: 1, data: { no: { turbolink: true }}}
or
%a{href: "", data: {mobile: 1, no: { turbolink: true }}}
(turbo-link got passed correctly, not the mobile)
(2) %span= link_to "Mobile", {mobile: 1, data: { no: { turbolink: true }}}
(3) %span= link_to "Mobile", {'mobile' => 1, 'data-no-turbolink' => true }
(4) %span= link_to "Mobile", url_for('mobile' => 1, 'data-no-turbolink' => true)
(5) %span= link_to "Mobile", data: {mobile: 1, no: {turbolink: true} }