Turn turbolinks on by default for new apps

This commit is contained in:
David Heinemeier Hansson 2012-10-04 20:22:18 +02:00
parent b0a7068564
commit e35d8b18d0
3 changed files with 11 additions and 4 deletions

View File

@ -226,7 +226,14 @@ module Rails
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 File

@ -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 File

@ -13,5 +13,6 @@
<% unless options[:skip_javascript] -%>
//= require <%= options[:javascript] %>
//= require <%= options[:javascript] %>_ujs
//= require turbolinks
<% end -%>
//= require_tree .