aboutsummaryrefslogtreecommitdiffstats
path: root/guides
diff options
context:
space:
mode:
authorRobin Dupret <robin.dupret@gmail.com>2013-06-27 17:30:59 +0200
committerRobin Dupret <robin.dupret@gmail.com>2013-06-29 11:37:11 +0200
commita08cc479389a44aa34529bfa5bdce6baee2fc7c1 (patch)
tree8098962515d287fd66b1e5e0c522ef59556e2c2e /guides
parent995b4cfcaa3ce0403105de518e4a453a9881cc7a (diff)
downloadrails-a08cc479389a44aa34529bfa5bdce6baee2fc7c1.tar.gz
rails-a08cc479389a44aa34529bfa5bdce6baee2fc7c1.tar.bz2
rails-a08cc479389a44aa34529bfa5bdce6baee2fc7c1.zip
Add few information about missing steps [ci skip]
Add some deprecations previously note covered such as the confirm option for the link_to helper or options which aren't needed anymore Also add a mention about the config.assets.js_compressor option.
Diffstat (limited to 'guides')
-rw-r--r--guides/source/upgrading_ruby_on_rails.md24
1 files changed, 23 insertions, 1 deletions
diff --git a/guides/source/upgrading_ruby_on_rails.md b/guides/source/upgrading_ruby_on_rails.md
index e7e28e21a3..7e046c4659 100644
--- a/guides/source/upgrading_ruby_on_rails.md
+++ b/guides/source/upgrading_ruby_on_rails.md
@@ -131,7 +131,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`):
+
+```ruby
+# Require the gems listed in Gemfile, including any gems
+# you've limited to :test, :development, or :production.
+Bundler.require(:default, Rails.env)
+```
### vendor/plugins
@@ -149,6 +157,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](https://github.com/rails/protected_attributes) 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:
```ruby
@@ -218,6 +229,11 @@ Please read [Pull Request #9978](https://github.com/rails/rails/pull/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`:
@@ -305,6 +321,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:
+
+```ruby
+config.assets.js_compressor = :uglifier
+```
### sass-rails