Permalink
Browse files

config.assets.enabled is now true by default

  • Loading branch information...
dhh committed Jan 5, 2013
1 parent fada87e commit 201f8d7753b594229a517e10a7181b15f3a33ffd
View
@@ -1,5 +1,11 @@
## Rails 4.0.0 (unreleased) ##
+* config.assets.enabled is now true by default. If you're upgrading from a Rails 3.x app
+ that does not use the asset pipeline, you'll be required to add `config.assets.enabled = false`
+ to your application.rb. If you don't want the asset pipeline on a new app use --skip-sprockets
+
+ *DHH*
+
* Environment name can be a start substring of the default environment names
(production, development, test). For example: tes, pro, prod, dev, devel.
Fix #8628.
@@ -48,12 +48,12 @@ def initialize(*)
@secret_key_base = nil
@assets = ActiveSupport::OrderedOptions.new
- @assets.enabled = false
+ @assets.enabled = true
@assets.paths = []
@assets.precompile = [ Proc.new { |path, fn| fn =~ /app\/assets/ && !%w(.js .css).include?(File.extname(path)) },
/(?:\/|\\|\A)application\.(css|js)$/ ]
@assets.prefix = "/assets"
- @assets.version = ''
+ @assets.version = '1.0'
@assets.debug = false
@assets.compile = true
@assets.digest = false
@@ -31,12 +31,9 @@ class Application < Rails::Application
# like if you have constraints or database-specific column types.
# config.active_record.schema_format = :sql
-<% unless options.skip_sprockets? -%>
- # Enable the asset pipeline.
- config.assets.enabled = true
-
- # Version of your assets, change this if you want to expire all your assets.
- config.assets.version = '1.0'
+<% if options.skip_sprockets? -%>
+ # Disable the asset pipeline.
+ config.assets.enabled = false
<% end -%>
end
end
@@ -32,6 +32,9 @@
# Generate digests for assets URLs.
config.assets.digest = true
+
+ # Version of your assets, change this if you want to expire all your assets.
+ config.assets.version = '1.0'
<%- end -%>
# Specifies the header that your server uses for sending files.
@@ -56,7 +56,6 @@ def test_assets
assert_file "app/views/layouts/application.html.erb", /stylesheet_link_tag\s+"application"/
assert_file "app/views/layouts/application.html.erb", /javascript_include_tag\s+"application"/
assert_file "app/assets/stylesheets/application.css"
- assert_file "config/application.rb", /config\.assets\.enabled = true/
end
def test_invalid_application_name_raises_an_error

0 comments on commit 201f8d7

Please sign in to comment.