Skip to content

kagux/turbolinks_plug

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TurbolinksPlug

This plug integrates turbolinks into your phoenix application. Because turbolinks makes an xhr requests it cannot update browser URL on redirects without help from backend. And that's exactly what this plug does. After each redirect initiated by turbolinks it sets Turbolinks-Location header to hint url.

Installation

  1. Add turbolinks_plug to your list of dependencies in mix.exs:
```elixir
def deps do
  [{:turbolinks_plug, "~> 0.1.0"}]
end
```
  1. Add plug to your pipeline in web/router.ex
  pipeline :browser do
    ...
    plug TurbolinksPlug
  end

About

Phoenix plug to integrate with turbolinks

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages