Skip to content
This repository has been archived by the owner on Jul 28, 2018. It is now read-only.

Allow to pass a url to Turbolinks.replace #649

Open
fsauter opened this issue Dec 24, 2015 · 0 comments
Open

Allow to pass a url to Turbolinks.replace #649

fsauter opened this issue Dec 24, 2015 · 0 comments

Comments

@fsauter
Copy link

fsauter commented Dec 24, 2015

Hi, I was just wondering why it is not possible to pass a URL to Turbolinks.replace?

I now have do the following (which is okay but I was expecting that turbolinks is capable of this):

$.get(price_table_invoice_path, function( partial_html ) {
    Turbolinks.replace(partial_html, { change: ['price-table'] });
});

// What I would expect:
Turbolinks.replace(price_table_invoice_path, { change: ['price-table'] });

Turbolinks.visit(invoice_path, { change: ['price-table'] }) would render the whole layout etc. on the server-side which should increase server's workload since I only need to reload/replace a small partial part of the page.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant