rails--rails/guides/source/5_0_release_notes.md

250 lines
7.2 KiB
Markdown
Raw Normal View History

2015-12-19 16:04:24 +00:00
**DO NOT READ THIS FILE ON GITHUB, GUIDES ARE PUBLISHED ON http://guides.rubyonrails.org.**
Ruby on Rails 5.0 Release Notes
===============================
Highlights in Rails 5.0:
* Action Cable
* Rails API
* Active Rcord Attributes API
* Test Runner
2015-12-19 16:04:24 +00:00
* Exclusive use of `rails` CLI over Rake
* Sprockets 3
* Turbolinks 5
* Ruby 2.2.2+ required
2015-12-19 16:04:24 +00:00
These release notes cover only the major changes. To learn about various bug
fixes and changes, please refer to the change logs or check out the [list of
commits](https://github.com/rails/rails/commits/5-0-stable) in the main Rails
repository on GitHub.
--------------------------------------------------------------------------------
Upgrading to Rails 5.0
----------------------
If you're upgrading an existing application, it's a great idea to have good test
coverage before going in. You should also first upgrade to Rails 4.2 in case you
haven't and make sure your application still runs as expected before attempting
an update to Rails 5.0. A list of things to watch out for when upgrading is
available in the
[Upgrading Ruby on Rails](upgrading_ruby_on_rails.html#upgrading-from-rails-4-2-to-rails-5-0)
guide.
2015-12-19 16:04:24 +00:00
Major Features
--------------
2015-12-19 16:04:24 +00:00
### Action Cable
[Pull Request](https://github.com/rails/rails/pull/22586)
2015-12-19 16:04:24 +00:00
ToDo...
2015-12-19 16:04:24 +00:00
### Rails API
[Pull Request](https://github.com/rails/rails/pull/19832)
2015-12-19 16:04:24 +00:00
ToDo...
2015-12-19 16:04:24 +00:00
### Active Record attributes API
2015-12-19 16:04:24 +00:00
ToDo...
2015-12-19 16:04:24 +00:00
### Test Runner
[Pull Request](https://github.com/rails/rails/pull/19216)
ToDo...
Railties
--------
2015-12-19 16:04:24 +00:00
Please refer to the [Changelog][railties] for detailed changes.
2015-12-19 16:04:24 +00:00
### Removals
2015-12-19 16:04:24 +00:00
* Removed debugger supprt use byebug instead. `debugger` is not supported by
Ruby
2.2. ([commit](https://github.com/rails/rails/commit/93559da4826546d07014f8cfa399b64b4a143127))
2015-12-19 16:04:24 +00:00
### Deprecations
2015-12-19 16:04:24 +00:00
### Notable changes
2015-12-19 16:04:24 +00:00
* Remove `Rack::ContentLength` middleware from the default
stack. ([Commit](https://github.com/rails/rails/commit/56903585a099ab67a7acfaaef0a02db8fe80c450))
2015-12-19 16:04:24 +00:00
* Improved test runner. ([Pull Request](https://github.com/rails/rails/pull/19216))
2015-12-19 16:04:24 +00:00
Action Pack
-----------
2015-12-19 16:04:24 +00:00
Please refer to the [Changelog][action-pack] for detailed changes.
2015-12-19 16:04:24 +00:00
### Removals
2015-12-19 16:04:24 +00:00
* Removed `ActionDispatch::Request::Utils.deep_munge`.
([commit](https://github.com/rails/rails/commit/52cf1a71b393486435fab4386a8663b146608996))
2015-12-19 16:04:24 +00:00
### Deprecations
### Notable changes
* Make `ActionController::Parameters` no longer inherits from
`HashWithIndifferentAccess`.
([Pull Request](https://github.com/rails/rails/pull/20868))
Action View
2015-12-19 16:04:24 +00:00
-------------
Please refer to the [Changelog][action-view] for detailed changes.
2015-12-19 16:04:24 +00:00
### Removals
2015-12-19 16:04:24 +00:00
### Deprecations
### Notable Changes
2015-12-19 16:04:24 +00:00
* Support explicit definition of resouce name for collection caching.
([Pull Request](https://github.com/rails/rails/pull/20781))
2015-12-19 16:04:24 +00:00
* Make `disable_with` default in `submit_tag`.
([Pull Request](https://github.com/rails/rails/pull/21135))
Action Mailer
-------------
Please refer to the [Changelog][action-mailer] for detailed changes.
### Removals
2015-12-19 16:04:24 +00:00
### Deprecations
### Notable changes
Active Record
2015-12-19 16:04:24 +00:00
-------------
Please refer to the [Changelog][active-record] for detailed changes.
2015-12-19 16:04:24 +00:00
### Removals
2015-12-19 16:04:24 +00:00
### Deprecations
* Deprecated returning `false` as a way to halt Active Record callback
chains. The recommended way is to
`throw(:abort)`. ([Pull Request](https://github.com/rails/rails/pull/17227))
* Synchronize behavior of `#tables`.
([Pull Request](https://github.com/rails/rails/pull/21601))
* Deprecate `connection.tables` on the SQLite3 and MySQL adapters.
* Deprecate passing arguments to `#tables` - the `#tables` method of some
adapters (mysql2, sqlite3) would return both tables and views while others
(postgresql) just return tables. To make their behavior consistent,
`#tables` will return only tables in the future.
2015-12-19 16:04:24 +00:00
* Deprecate `table_exists?` - The `#table_exists?` method would check both
tables and views. To make their behavior consistent with `#tables`,
`#table_exists?` will check only tables in the future.
2015-12-19 16:04:24 +00:00
### Notable changes
* Add a `foreign_key` option to `references` while creating the table.
([commit](https://github.com/rails/rails/commit/99a6f9e60ea55924b44f894a16f8de0162cf2702))
* New attributes
API. ([commit](https://github.com/rails/rails/commit/8c752c7ac739d5a86d4136ab1e9d0142c4041e58))
* Add `:enum_prefix`/`:enum_suffix` option to `enum`
definition. ([Pull Request](https://github.com/rails/rails/pull/19813))
* Add `#cache_key` to `ActiveRecord::Relation`.
([Pull Request](https://github.com/rails/rails/pull/20884))
* Add `ActiveRecord::Relation#outer_joins`.
([Pull Request](https://github.com/rails/rails/pull/12071))
* Require `belongs_to` by default.
([Pull Request](https://github.com/rails/rails/pull/18937)) - Deprecate
`required` option in favor of `optional` for `belongs_to`
2015-12-19 16:04:24 +00:00
Active Model
------------
Please refer to the [Changelog][active-model] for detailed changes.
2015-12-19 16:04:24 +00:00
### Removals
* Removed XML serialization. This feature has been extracted into the
[activemodel-serializers-xml](https://github.com/rails/activemodel-serializers-xml) gem.
([Pull Request](https://github.com/rails/rails/pull/21161))
2015-12-19 16:04:24 +00:00
### Deprecations
* Deprecated returning `false` as a way to halt Active Model and
`ActiveModel::Valdiations` callback chains. The recommended way is to
`throw(:abort)`. ([Pull Request](https://github.com/rails/rails/pull/17227))
2015-12-19 16:04:24 +00:00
### Notable changes
2015-12-19 16:04:24 +00:00
* Validate multiple contexts on `valid?` and `invalid?` at once.
([Pull Request](https://github.com/rails/rails/pull/21069))
2015-12-19 16:04:24 +00:00
Active Job
-----------
Please refer to the [Changelog][active-job] for detailed changes.
### Removals
2015-12-19 16:04:24 +00:00
### Deprecations
### Notable changes
2015-12-19 16:04:24 +00:00
Active Support
--------------
Please refer to the [Changelog][active-support] for detailed changes.
2015-12-19 16:04:24 +00:00
### Removals
2015-12-19 16:04:24 +00:00
### Deprecations
* Replace `ActiveSupport::Concurrency::Latch` with
`Concurrent::CountDownLatch` from concurrent-ruby.
([Pull Request](https://github.com/rails/rails/pull/20866))
2015-12-19 16:04:24 +00:00
### Notable changes
* New config option
`config.active_support.halt_callback_chains_on_return_false` to specify
whether ActiveRecord, ActiveModel and ActiveModel::Validations callback
chains can be halted by returning `false` in a 'before' callback.
([Pull Request](https://github.com/rails/rails/pull/17227))
2015-12-19 16:04:24 +00:00
Credits
-------
See the
[full list of contributors to Rails](http://contributors.rubyonrails.org/) for
the many people who spent many hours making Rails, the stable and robust
framework it is. Kudos to all of them.
[railties]: https://github.com/rails/rails/blob/5-0-stable/railties/CHANGELOG.md
[action-pack]: https://github.com/rails/rails/blob/5-0-stable/actionpack/CHANGELOG.md
[action-view]: https://github.com/rails/rails/blob/5-0-stable/actionview/CHANGELOG.md
[action-mailer]: https://github.com/rails/rails/blob/5-0-stable/actionmailer/CHANGELOG.md
[active-record]: https://github.com/rails/rails/blob/5-0-stable/activerecord/CHANGELOG.md
[active-model]: https://github.com/rails/rails/blob/5-0-stable/activemodel/CHANGELOG.md
[active-support]: https://github.com/rails/rails/blob/5-0-stable/activesupport/CHANGELOG.md
[active-job]: https://github.com/rails/rails/blob/5-0-stable/activejob/CHANGELOG.md