diff options
Diffstat (limited to 'railties/lib/rails')
-rw-r--r-- | railties/lib/rails/generators/app_base.rb | 2 | ||||
-rw-r--r-- | railties/lib/rails/generators/rails/app/templates/app/assets/javascripts/application.js.tt | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/railties/lib/rails/generators/app_base.rb b/railties/lib/rails/generators/app_base.rb index d79cf2b2f0..2022b4ed3d 100644 --- a/railties/lib/rails/generators/app_base.rb +++ b/railties/lib/rails/generators/app_base.rb @@ -113,7 +113,7 @@ module Rails end def add_gem_entry_filter - @gem_filter = lambda { |next_filter,entry| + @gem_filter = lambda { |next_filter, entry| yield(entry) && next_filter.call(entry) }.curry[@gem_filter] end 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 8b91313e51..07ea09cdbd 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,6 +13,8 @@ <% unless options[:skip_javascript] -%> //= require <%= options[:javascript] %> //= require <%= options[:javascript] %>_ujs +<% if gemfile_entries.any? { |m| m.name == "turbolinks" } -%> //= require turbolinks <% end -%> +<% end -%> //= require_tree . |