Skip to content

Commit

Permalink
Update turbolinks references to turbo (shakacode#268)
Browse files Browse the repository at this point in the history
  • Loading branch information
DinerIsmail authored Mar 24, 2023
1 parent bca9a36 commit bd4eef5
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,16 +234,16 @@ packs with the chunks in your view, which creates html tags for all the chunks.
You can provide multiple packs and other attributes. Note, `defer` defaults to showing.

```erb
<%= javascript_pack_tag 'calendar', 'map', 'data-turbolinks-track': 'reload' %>
<%= javascript_pack_tag 'calendar', 'map', 'data-turbo-track': 'reload' %>
```

The resulting HTML would look like:
```
<script src="/packs/vendor-16838bab065ae1e314.js" data-turbolinks-track="reload" defer></script>
<script src="/packs/calendar~runtime-16838bab065ae1e314.js" data-turbolinks-track="reload" defer></script>
<script src="/packs/calendar-1016838bab065ae1e314.js" data-turbolinks-track="reload" defer"></script>
<script src="/packs/map~runtime-16838bab065ae1e314.js" data-turbolinks-track="reload" defer></script>
<script src="/packs/map-16838bab065ae1e314.js" data-turbolinks-track="reload" defer></script>
<script src="/packs/vendor-16838bab065ae1e314.js" data-turbo-track="reload" defer></script>
<script src="/packs/calendar~runtime-16838bab065ae1e314.js" data-turbo-track="reload" defer></script>
<script src="/packs/calendar-1016838bab065ae1e314.js" data-turbo-track="reload" defer"></script>
<script src="/packs/map~runtime-16838bab065ae1e314.js" data-turbo-track="reload" defer></script>
<script src="/packs/map-16838bab065ae1e314.js" data-turbo-track="reload" defer></script>
```

In this output, both the calendar and map codes might refer to other common libraries. Those get placed something like the vendor bundle. The view helper removes any duplication.
Expand Down

0 comments on commit bd4eef5

Please sign in to comment.