diff options
author | Guillermo Iguaran <guilleiguaran@gmail.com> | 2016-11-19 21:25:36 -0500 |
---|---|---|
committer | Guillermo Iguaran <guilleiguaran@gmail.com> | 2016-11-19 21:26:34 -0500 |
commit | 03fc9a49309d807bc3f83c3ad6ac33acb0053ae3 (patch) | |
tree | 04a06b47c0b2c209639962c966bd24807f4a36d9 | |
parent | 20db1dab77219ee96d2334d0e59d0656f69ffb94 (diff) | |
download | rails-03fc9a49309d807bc3f83c3ad6ac33acb0053ae3.tar.gz rails-03fc9a49309d807bc3f83c3ad6ac33acb0053ae3.tar.bz2 rails-03fc9a49309d807bc3f83c3ad6ac33acb0053ae3.zip |
Use existing --skip-turbolinks option for conditionals instead of checking if turbolinks is present in gemfile list
2 files changed, 2 insertions, 2 deletions
diff --git a/railties/lib/rails/generators/rails/app/templates/app/assets/javascripts/application.js.tt b/railties/lib/rails/generators/rails/app/templates/app/assets/javascripts/application.js.tt index c88426ec06..5d633724d5 100644 --- a/railties/lib/rails/generators/rails/app/templates/app/assets/javascripts/application.js.tt +++ b/railties/lib/rails/generators/rails/app/templates/app/assets/javascripts/application.js.tt @@ -13,7 +13,7 @@ <% unless options[:skip_javascript] -%> //= require <%= options[:javascript] %> //= require <%= options[:javascript] %>_ujs -<% if gemfile_entries.any? { |m| m.name == "turbolinks" } -%> +<% unless options[:skip_turbolinks] -%> //= require turbolinks <% end -%> <% end -%> diff --git a/railties/lib/rails/generators/rails/app/templates/app/views/layouts/application.html.erb.tt b/railties/lib/rails/generators/rails/app/templates/app/views/layouts/application.html.erb.tt index d51f79bd49..5460155b3e 100644 --- a/railties/lib/rails/generators/rails/app/templates/app/views/layouts/application.html.erb.tt +++ b/railties/lib/rails/generators/rails/app/templates/app/views/layouts/application.html.erb.tt @@ -7,7 +7,7 @@ <%- if options[:skip_javascript] -%> <%%= stylesheet_link_tag 'application', media: 'all' %> <%- else -%> - <%- if gemfile_entries.any? { |m| m.name == 'turbolinks' } -%> + <%- unless options[:skip_turbolinks] -%> <%%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %> <%%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %> <%- else -%> |