1f713d52d7
- Turbolinks caches the `head`, so `gon` updates don't show up unless the user navigates to page directly (by URL) or performs a refresh. - The solution is to render `gon` in the body instead. - Also update the syntax to the new Rails 4 (according to the gon README) syntax.
13 lines
434 B
Text
13 lines
434 B
Text
!!! 5
|
|
%html{ lang: "en"}
|
|
= render "layouts/head"
|
|
%body{class: "#{user_application_theme}", 'data-page' => body_data_page}
|
|
= Gon::Base.render_data
|
|
|
|
-# Ideally this would be inside the head, but turbolinks only evaluates page-specific JS in the body.
|
|
= yield :scripts_body_top
|
|
|
|
= render "layouts/header/default", title: header_title
|
|
= render 'layouts/page', sidebar: sidebar, nav: nav
|
|
|
|
= yield :scripts_body
|