ruby on rails - Never use Turbolinks to load a specific route -


i know can use data-no-turbolink attribute ensure link (or many links) don't use turbolinks, there way ensure a specific page never loaded via turbolinks?

i have particular page broken when loaded via turbolinks, , instead of employing hacks fix this, i'd rather page load in usual fashion.

i know can add data-no-turbolink links going page, i'd have remember every subsequent link page, pretty hacky.

is there better way?

to modify new , existing urls remove turbolinks specific url, read below:

since you're wanting use "data-no-turbolinks" when linking specific page via link_to, can modify method check url of destination , set data-no-turbolinks attribute.

modify link_to helper (be sure replace route_url , route_path correct variables routes:

# application_helper.rb def link_to(name, path, options = {})   no_turbolink_routes = [route_url, route_path]  # add urls/paths here    if no_turbolink_routes.include? path     options['data-no-turbolinks'] = 'true'   end    super(name, path, options) end 

Comments

Popular posts from this blog

searchKeyword not working in AngularJS filter -

sequelize.js - Sequelize: sort by enum cases -

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -