Browse files

Merge pull request #11143 from robin850/upgrading-rails

Add few information about missing steps [ci skip]
  • Loading branch information...
1 parent 4151d67 commit 6b44d6ee5be5c365405aabb8ef3987319f7e77cf @rafaelfranca rafaelfranca committed Jul 9, 2013
Showing with 23 additions and 1 deletion.
  1. +23 −1 guides/source/
@@ -33,7 +33,15 @@ The following changes are meant for upgrading your application to Rails 4.0.
### Gemfile
-Rails 4.0 removed the `assets` group from Gemfile. You'd need to remove that line from your Gemfile when upgrading.
+Rails 4.0 removed the `assets` group from Gemfile. You'd need to remove that
+line from your Gemfile when upgrading. You should also update your application
+file (in `config/application.rb`):
+# Require the gems listed in Gemfile, including any gems
+# you've limited to :test, :development, or :production.
+Bundler.require(:default, Rails.env)
### vendor/plugins
@@ -51,6 +59,9 @@ Rails 4.0 no longer supports loading plugins from `vendor/plugins`. You must rep
* Rails 4.0 has removed `attr_accessible` and `attr_protected` feature in favor of Strong Parameters. You can use the [Protected Attributes gem]( to a smoothly upgrade path.
+* If you are not using Protected Attributes, you can remove any options related to
+this gem such as `whitelist_attributes` or `mass_assignment_sanitizer` options.
* Rails 4.0 requires that scopes use a callable object such as a Proc or lambda:
@@ -110,6 +121,11 @@ Please read [Pull Request #9978]( for d
* Rails 4.0 deprecates the `dom_id` and `dom_class` methods in controllers (they are fine in views). You will need to include the `ActionView::RecordIdentifier` module in controllers requiring this feature.
+* Rails 4.0 deprecates the `:confirm` option for the `link_to` helper. You should
+instead rely on a data attribute (e.g. `data: { confirm: 'Are you sure?' }`).
+This deprecation also concerns the helpers based on this one (such as `link_to_if`
+or `link_to_unless`).
* Rails 4.0 changed how `assert_generates`, `assert_recognizes`, and `assert_routing` work. Now all these assertions raise `Assertion` instead of `ActionController::RoutingError`.
* Rails 4.0 raises an `ArgumentError` if clashing named routes are defined. This can be triggered by explicitly defined named routes or by the `resources` method. Here are two examples that clash with routes named `example_path`:
@@ -197,6 +213,12 @@ Active Record Observer and Action Controller Sweeper have been extracted to the
### sprockets-rails
* `assets:precompile:primary` has been removed. Use `assets:precompile` instead.
+* The `config.assets.compress` option should be changed to
+`config.assets.js_compressor` like so for instance:
+config.assets.js_compressor = :uglifier
### sass-rails

0 comments on commit 6b44d6e

Please sign in to comment.