1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/guides/source/6_0_release_notes.md
2019-03-29 22:22:56 +05:30

9.6 KiB

DO NOT READ THIS FILE ON GITHUB, GUIDES ARE PUBLISHED ON https://guides.rubyonrails.org.

Ruby on Rails 6.0 Release Notes

Highlights in Rails 6.0:

  • Action Mailbox
  • Action Text
  • Parallel Testing
  • Action Cable Testing

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 in the main Rails repository on GitHub.


Upgrading to Rails 6.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 5.2 in case you haven't and make sure your application still runs as expected before attempting an update to Rails 6.0. A list of things to watch out for when upgrading is available in the Upgrading Ruby on Rails guide.

Major Features

Action Mailbox

Pull Request

Action Mailbox allows you to route incoming emails to controller-like mailboxes. You can read more about Action Mailbox in the Action Mailbox Basics guide.

Action Text

Pull Request

Action Text brings rich text content and editing to Rails. It includes the Trix editor that handles everything from formatting to links to quotes to lists to embedded images and galleries. The rich text content generated by the Trix editor is saved in its own RichText model that's associated with any existing Active Record model in the application. Any embedded images (or other attachments) are automatically stored using Active Storage and associated with the included RichText model.

You can read more about Action Text in the Action Text Overview guide.

Parallel Testing

Pull Request

Parallel Testing allows you to parallelize your test suite. While forking processes is the default method, threading is supported as well. Running tests in parallel reduces the time it takes your entire test suite to run.

Action Cable Testing

Pull Request

Action Cable testing tools allow you to test your Action Cable functionality at any level: connections, channels, broadcasts.

Railties

Please refer to the Changelog for detailed changes.

Removals

  • Remove deprecated after_bundle helper inside plugins templates. (Commit)

  • Remove deprecated support to config.ru that uses the application class as argument of run. (Commit)

  • Remove deprecated environment argument from the rails commands. (Commit)

  • Remove deprecated capify! method in generators and templates. (Commit)

  • Remove deprecated config.secret_token. (Commit)

Deprecations

  • Deprecate passing Rack server name as a regular argument to rails server. (Pull Request)

  • Deprecate support for using HOST environment to specify server IP. (Pull Request)

  • Deprecate accessing hashes returned by config_for by non-symbol keys. (Pull Request)

Notable changes

  • Add an explicit option --using or -u for specifying the server for the rails server command. (Pull Request)

  • Add ability to see the output of rails routes in expanded format. (Pull Request)

  • Run the seed database task using inline Active Job adapter. (Pull Request)

  • Add a command rails db:system:change to change the database of the application. (Pull Request)

  • Add rails test:channels command to test only Action Cable channels. (Pull Request)

  • Introduce guard against DNS rebinding attacks. (Pull Request)

  • Add ability to abort on failure while running generator commands. (Pull Request)

  • Make Webpacker the default JavaScript compiler for Rails 6. (Pull Request)

  • Add multiple database support for rails db:migrate:status command. (Pull Request)

  • Add ability to use different migration paths from multiple databases in the generators. (Pull Request)

  • Add support for multi environment credentials. (Pull Request)

  • Make null_store as default cache store in test environment. (Pull Request)

Action Cable

Please refer to the Changelog for detailed changes.

Removals

Deprecations

Notable changes

  • The ActionCable javascript package has been converted from CoffeeScript to ES2015, and we now publish the source code in the npm distribution.

    This allows ActionCable users to depend on the javascript source code rather than the compiled code, which can produce smaller javascript bundles.

    This change includes some breaking changes to optional parts of the ActionCable javascript API:

    • Configuration of the WebSocket adapter and logger adapter have been moved from properties of ActionCable to properties of ActionCable.adapters.

    • The ActionCable.startDebugging() and ActionCable.stopDebugging() methods have been removed and replaced with the property ActionCable.logger.enabled.

Action Pack

Please refer to the Changelog for detailed changes.

Removals

Deprecations

Notable changes

Action View

Please refer to the Changelog for detailed changes.

Removals

Deprecations

Notable changes

Action Mailer

Please refer to the Changelog for detailed changes.

Removals

Deprecations

Notable changes

Active Record

Please refer to the Changelog for detailed changes.

Removals

Deprecations

Notable changes

Active Storage

Please refer to the Changelog for detailed changes.

Removals

Deprecations

Notable changes

Active Model

Please refer to the Changelog for detailed changes.

Removals

Deprecations

Notable changes

  • Add a configuration option to customize format of the ActiveModel::Errors#full_message. (Pull Request)

  • Add support for configuring attribute name for has_secure_password. (Pull Request)

  • Add #slice! method to ActiveModel::Errors. (Pull Request)

  • Add ActiveModel::Errors#of_kind? to check presence of a specific error. (Pull Request)

Active Support

Please refer to the Changelog for detailed changes.

Removals

Deprecations

Notable changes

Active Job

Please refer to the Changelog for detailed changes.

Removals

Deprecations

Notable changes

Ruby on Rails Guides

Please refer to the Changelog for detailed changes.

Notable changes

Credits

See the full list of contributors to Rails for the many people who spent many hours making Rails, the stable and robust framework it is. Kudos to all of them.