seyhunak / twitter-bootstrap-rails

Twitter Bootstrap for Rails 6.0, Rails 5 - Rails 4.x Asset Pipeline
https://github.com/seyhunak/twitter-bootstrap-rails
4.49k stars 997 forks source link

Avoid duplicate loading of JavaScript in Rails4 #616

Closed shizm closed 11 years ago

shizm commented 11 years ago

Layout template that is generated by the following command

rails g bootstrap:layout [LAYOUT_NAME] [*fixed or fluid]

includes javascript_include_tag in the body tag.

In rails4, turbolinks replace body contents instead of reload page, so JavaScript loaded multiple times.

If target page has submit button with data-confirm="Are You Sure?", confirm dialog shown multiple times.

coveralls commented 11 years ago

Coverage Status

Coverage remained the same when pulling 0b3741d07c0c4be98307ab068df569697bd9a143 on shizm:modify-layout-template-for-turbolinks into cdda8d78b41275e1fa4a6d7aa71b370573ca2553 on seyhunak:master.

coveralls commented 11 years ago

Coverage Status

Coverage remained the same when pulling 0b3741d07c0c4be98307ab068df569697bd9a143 on shizm:modify-layout-template-for-turbolinks into cdda8d78b41275e1fa4a6d7aa71b370573ca2553 on seyhunak:master.