I am having a play around with Bootstrap 4 in Rails 5 and I am trying to get a data-toggle
to work on nav-pills
.
With my code below, the pill
toggle works and it breaks the link_to
part of the code and the link doesn't work.
<div class="card">
<div class="card-block">
<ul class="nav nav-pills nav-justified" role="tablist">
<%= link_to 'All Things', all_things_path, class: 'nav-link nav-item active' %>
<%= link_to 'Some Things', some_things_path(@things[0]), class: 'nav-link nav-item', "data-toggle" => "pill" %>
</ul>
</div>
</div>
If I remove the "data-toggle" => "pill"
the link works fine and routes to the collection as required.
I have also tried using data: { toggle: "pills" }
but this also breaks the link.
Anyone got any ideas?