Skip to content

Instantly share code, notes, and snippets.

@jswanner
Created October 7, 2011 19:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jswanner/1271147 to your computer and use it in GitHub Desktop.
Save jswanner/1271147 to your computer and use it in GitHub Desktop.
Differences between Rails 3.1.0.rc5 & Rails 3.1.1 generated apps
diff -U 0 -r rails-3.1.0.rc5/config/application.rb rails-3.1.1/config/application.rb
--- rails-3.1.0.rc5/config/application.rb 2011-10-07 12:03:29.000000000 -0400
+++ rails-3.1.1/config/application.rb 2011-10-07 12:59:13.000000000 -0400
@@ -5,4 +5,6 @@
-# If you have a Gemfile, require the default gems, the ones in the
-# current environment and also include :assets gems if in development
-# or test environments.
-Bundler.require *Rails.groups(:assets) if defined?(Bundler)
+if defined?(Bundler)
+ # If you precompile assets before deploying to production, use this line
+ Bundler.require(*Rails.groups(:assets => %w(development test)))
+ # If you want your assets lazily compiled in production, use this line
+ # Bundler.require(:default, :assets, Rails.env)
+end
@@ -41,0 +44,3 @@
+
+ # Version of your assets, change this if you want to expire all your assets
+ config.assets.version = '1.0'
diff -U 0 -r rails-3.1.0.rc5/config/environments/development.rb rails-3.1.1/config/environments/development.rb
--- rails-3.1.0.rc5/config/environments/development.rb 2011-10-07 12:03:29.000000000 -0400
+++ rails-3.1.1/config/environments/development.rb 2011-10-07 12:59:13.000000000 -0400
@@ -26,0 +27,3 @@
+
+ # Expands the lines which load the assets
+ config.assets.debug = true
diff -U 0 -r rails-3.1.0.rc5/Gemfile rails-3.1.1/Gemfile
--- rails-3.1.0.rc5/Gemfile 2011-10-07 12:03:29.000000000 -0400
+++ rails-3.1.1/Gemfile 2011-10-07 12:59:13.000000000 -0400
@@ -3 +3 @@
-gem 'rails', '3.1.0.rc5'
+gem 'rails', '3.1.1'
@@ -14,3 +14,3 @@
- gem 'sass-rails', "~> 3.1.0.rc"
- gem 'coffee-rails', "~> 3.1.0.rc"
- gem 'uglifier'
+ gem 'sass-rails', '~> 3.1.4'
+ gem 'coffee-rails', '~> 3.1.1'
+ gem 'uglifier', '>= 1.0.3'
@@ -20,0 +21,3 @@
+# To use ActiveModel has_secure_password
+# gem 'bcrypt-ruby', '~> 3.0.0'
diff -U 0 -r rails-3.1.0.rc5/config/environments/production.rb rails-3.1.1/config/environments/production.rb
--- rails-3.1.0.rc5/config/environments/production.rb 2011-10-07 12:03:29.000000000 -0400
+++ rails-3.1.1/config/environments/production.rb 2011-10-07 12:59:13.000000000 -0400
@@ -16,0 +17,9 @@
+ # Don't fallback to assets pipeline if a precompiled asset is missed
+ config.assets.compile = false
+
+ # Generate digests for assets URLs
+ config.assets.digest = true
+
+ # Defaults to Rails.root.join("public/assets")
+ # config.assets.manifest = YOUR_PATH
+
@@ -18,2 +27,2 @@
- # (comment out if your front-end server doesn't support this)
- config.action_dispatch.x_sendfile_header = "X-Sendfile" # Use 'X-Accel-Redirect' for nginx
+ # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
+ # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
diff -U 0 -r rails-3.1.0.rc5/config/initializers/wrap_parameters.rb rails-3.1.1/config/initializers/wrap_parameters.rb
--- rails-3.1.0.rc5/config/initializers/wrap_parameters.rb 2011-10-07 12:03:29.000000000 -0400
+++ rails-3.1.1/config/initializers/wrap_parameters.rb 2011-10-07 12:59:13.000000000 -0400
@@ -7 +7,3 @@
-ActionController::Base.wrap_parameters format: [:json]
+ActiveSupport.on_load(:action_controller) do
+ wrap_parameters format: [:json]
+end
@@ -10,2 +12,2 @@
-if defined?(ActiveRecord)
- ActiveRecord::Base.include_root_in_json = false
+ActiveSupport.on_load(:active_record) do
+ self.include_root_in_json = false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment