i'm working on a project in Rails. When I click on a "link_to" button
turbolinks is not working. But when I create a "<a>" link, it's working
!
Why ?
I use Google chrome for look if it working. But in firefox it's not
working too.
My app.js :
//
//= require jquery
//= require bootstrap-sprockets
//= require ckeditor/init
//= require jquery_ujs
//= require jquery.turbolinks
//= require bootstrap-slider
//= require jquery.tablesorter.min
//= require jquery.tablesorter.widgets.min
//= require fixedheadertable
//= require nprogress
//= require nprogress-turbolinks
//= require turbolinks
//= require_tree .
My two links :
<li><%= link_to "Tous les incidents", incidents_url, class: "",
:method => :get %></li>
<li><a href="/incidents">Tous les incidents</a></li>
i'm working on a project in Rails. When I click on a "link_to" button
turbolinks is not working. But when I create a "<a>" link, it's working
How do you know it is not working?
Show us the source of the link_to and copy/paste the html that it
produces by viewing the source in the browser (ctrl+u in firefox).
Just the html around the link.
As you can seen, i have write "data-no-turbolink="true"" at the first
link but not at the others links. So, when i create links with link_to,
turbolinks not working but with <a></a> it's working.
For me, at least, you have still not provided enough information to
work out exactly what your problem is. I don't know whether you are
saying that your erb source is not producing the correct html (but you
have not shown the erb source so difficult to judge that) or whether
you are saying that the html that you have shown is not performing as
it should (but in that case you have not told us what is not happening
that should).
By the way, to post something and then 'up' it in six hours is
ridiculous. Most of us need at least that much sleep at some time in
the day and many of us only do this in our spare time. Remember that
this mailing list has a world wide audience and we are not all in the
same time zone.