Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Turn turbolinks on by default for new apps

  • Loading branch information...
commit e35d8b18d0649c0ecc58f6b73df6b3c8d0c6bb74 1 parent b0a7068
@dhh dhh authored
View
9 railties/lib/rails/generators/app_base.rb
@@ -226,7 +226,14 @@ def assets_gemfile_entry
end
def javascript_gemfile_entry
- "gem '#{options[:javascript]}-rails'" unless options[:skip_javascript]
+ unless options[:skip_javascript]
+ <<-GEMFILE
+ gem '#{options[:javascript]}-rails'
+
+ # Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
+ gem 'turbolinks'
+ GEMFILE
+ end
end
def javascript_runtime_gemfile_entry
View
5 railties/lib/rails/generators/rails/app/templates/Gemfile
@@ -9,14 +9,13 @@ source 'https://rubygems.org'
<%= assets_gemfile_entry %>
<%= javascript_gemfile_entry %>
-# Puts a simple HTTP cache in front of your app.
-# For large-scale production use, consider using a caching reverse proxy like nginx, varnish, or squid.
+# Puts a simple HTTP cache in front of your app (and gets you ready for later upgrading to nginx/varnish/squid)
gem 'rack-cache', '~> 1.2'
# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
-# To use Jbuilder templates for JSON
+# Build JSON APIs with ease. Read more: http://github.com/rails/jbuilder
# gem 'jbuilder'
# Use unicorn as the app server
View
1  railties/lib/rails/generators/rails/app/templates/app/assets/javascripts/application.js.tt
@@ -13,5 +13,6 @@
<% unless options[:skip_javascript] -%>
//= require <%= options[:javascript] %>
//= require <%= options[:javascript] %>_ujs
+//= require turbolinks
<% end -%>
//= require_tree .

0 comments on commit e35d8b1

Please sign in to comment.
Something went wrong with that request. Please try again.