Added multiple database Active Record guide entry to the release notes
44 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
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
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
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
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 ofrun
. (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 therails 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
- Replace
ActionCable.startDebugging()
andActionCable.stopDebugging()
withActionCable.logger.enabled
. (Pull Request)
Deprecations
- There are no deprecations for Action Cable in Rails 6.0.
Notable changes
-
Add support for the
channel_prefix
option for PostgreSQL subscription adapters incable.yml
. (Pull Request) -
Allow passing a custom configuration to
ActionCable::Server::Base
. (Pull Request) -
Add
:action_cable_connection
and:action_cable_channel
load hooks. (Pull Request) -
Add
Channel::Base#broadcast_to
andChannel::Base.broadcasting_for
. (Pull Request) -
Close a connection when calling
reject_unauthorized_connection
from anActionCable::Connection
. (Pull Request) -
Convert the Action Cable JavaScript package from CoffeeScript to ES2015 and publish the source code in the npm distribution. (Pull Request)
-
Move the configuration of the WebSocket adapter and logger adapter from properties of
ActionCable
toActionCable.adapters
. (Pull Request) -
Add an
id
option to the Redis adapter to distinguish Action Cable's Redis connections. (Pull Request)
Action Pack
Please refer to the Changelog for detailed changes.
Removals
-
Remove deprecated
fragment_cache_key
helper in favor ofcombined_fragment_cache_key
. (Commit) -
Remove deprecated methods in
ActionDispatch::TestResponse
:#success?
in favor of#successful?
,#missing?
in favor of#not_found?
,#error?
in favor of#server_error?
. (Commit)
Deprecations
-
Deprecate
ActionDispatch::Http::ParameterFilter
in favor ofActiveSupport::ParameterFilter
. (Pull Request) -
Deprecate controller level
force_ssl
in favor ofconfig.force_ssl
. (Pull Request)
Notable changes
-
Change
ActionDispatch::Response#content_type
returning Content-Type header as it is. (Pull Request) -
Raise an
ArgumentError
if a resource param contains a colon. (Pull Request) -
Allow
ActionDispatch::SystemTestCase.driven_by
to be called with a block to define specific browser capabilities. (Pull Request) -
Add
ActionDispatch::HostAuthorization
middleware that guards against DNS rebinding attacks. (Pull Request) -
Allow the use of
parsed_body
inActionController::TestCase
. (Pull Request) -
Raise an
ArgumentError
when multiple root routes exist in the same context withoutas:
naming specifications. (Pull Request) -
Allow the use of
#rescue_from
for handling parameter parsing errors. (Pull Request) -
Add
ActionController::Parameters#each_value
for iterating through parameters. (Pull Request) -
Encode Content-Disposition filenames on
send_data
andsend_file
. (Pull Request) -
Expose
ActionController::Parameters#each_key
. (Pull Request) -
Add purpose and expiry metadata inside signed/encrypted cookies to prevent copying the value of cookies into one another. (Pull Request)
-
Raise
ActionController::RespondToMismatchError
for conflictingrespond_to
invocations. (Pull Request) -
Add an explicit error page for when a template is missing for a request format. (Pull Request)
-
Introduce
ActionDispatch::DebugExceptions.register_interceptor
, a way to hook into DebugExceptions and process the exception, before being rendered. (Pull Request) -
Output only one Content-Security-Policy nonce header value per request. (Pull Request)
-
Add a module specifically for the Rails default headers configuration that can be explicitly included in controllers. (Pull Request)
-
Add
#dig
toActionDispatch::Request::Session
. (Pull Request)
Action View
Please refer to the Changelog for detailed changes.
Removals
-
Remove deprecated
image_alt
helper. (Commit) -
Remove an empty
RecordTagHelper
module from which the functionality was already moved to therecord_tag_helper
gem. (Commit)
Deprecations
-
Deprecate
ActionView::Template.finalize_compiled_template_methods
with no replacement. (Pull Request) -
Deprecate
config.action_view.finalize_compiled_template_methods
with no replacement. (Pull Request) -
Deprecate calling private model methods from the
options_from_collection_for_select
view helper. (Pull Request)
Notable changes
-
Clear Action View cache in development only on file changes, speeding up development mode. (Pull Request)
-
Move all of the Rails npm packages into a
@rails
scope. (Pull Request) -
Only accept formats from registered MIME types. (Pull Request, Pull Request)
-
Add allocations to the template and partial rendering server output. (Pull Request)
-
Add a
year_format
option todate_select
tag, making it possible to customize year names. (Pull Request) -
Add a
nonce: true
option forjavascript_include_tag
helper to support automatic nonce generation for a Content Security Policy. (Pull Request) -
Add a
action_view.finalize_compiled_template_methods
configuration to disable or enableActionView::Template
finalizers. (Pull Request) -
Extract the JavaScript
confirm
call to its own, overridable method inrails_ujs
. (Pull Request) -
Add a
action_controller.default_enforce_utf8
configuration option to handle enforcing UTF-8 encoding. This defaults tofalse
. (Pull Request) -
Add I18n key style support for locale keys to submit tags. (Pull Request)
Action Mailer
Please refer to the Changelog for detailed changes.
Removals
Deprecations
-
Deprecate
ActionMailer::Base.receive
in favor of Action Mailbox. (Commit) -
Deprecate
DeliveryJob
andParameterized::DeliveryJob
in favor ofMailDeliveryJob
. (Pull Request)
Notable changes
-
Add
MailDeliveryJob
for delivering both regular and parameterized mail. (Pull Request) -
Allow custom email delivery jobs to work with the Action Mailer test assertions. (Pull Request)
-
Allow specifying a template name for multipart emails with blocks instead of using just the action name. (Pull Request)
-
Add
perform_deliveries
to payload ofdeliver.action_mailer
notification. (Pull Request) -
Improve the logging message when
perform_deliveries
is false to indicate that sending of emails was skipped. (Pull Request) -
Allow calling
assert_enqueued_email_with
without block. (Pull Request) -
Perform the enqueued mail delivery jobs in the
assert_emails
block. (Pull Request) -
Allow
ActionMailer::Base
to unregister observers and interceptors. (Pull Request)
Active Record
Please refer to the Changelog for detailed changes.
Removals
-
Remove deprecated
#set_state
from the transaction object. (Commit) -
Remove deprecated
#supports_statement_cache?
from the database adapters. (Commit) -
Remove deprecated
#insert_fixtures
from the database adapters. (Commit) -
Remove deprecated
ActiveRecord::ConnectionAdapters::SQLite3Adapter#valid_alter_table_type?
. (Commit) -
Remove support for passing the column name to
sum
when a block is passed. (Commit) -
Remove support for passing the column name to
count
when a block is passed. (Commit) -
Remove support for delegation of missing methods in a relation to Arel. (Commit)
-
Remove support for delegating missing methods in a relation to private methods of the class. (Commit)
-
Remove support for specifying a timestamp name for
#cache_key
. (Commit) -
Remove deprecated
ActiveRecord::Migrator.migrations_path=
. (Commit) -
Remove deprecated
expand_hash_conditions_for_aggregates
. (Commit)
Deprecations
-
Deprecate mismatched case-sensitivity collation comparisons for uniqueness validator. (Commit)
-
Deprecate using class level querying methods if the receiver scope has leaked. (Pull Request)
-
Deprecate
config.active_record.sqlite3.represent_boolean_as_integer
. (Commit) -
Deprecate passing
migrations_paths
toconnection.assume_migrated_upto_version
. (Commit) -
Deprecate
ActiveRecord::Result#to_hash
in favor ofActiveRecord::Result#to_a
. (Commit) -
Deprecate methods in
DatabaseLimits
:column_name_length
,table_name_length
,columns_per_table
,indexes_per_table
,columns_per_multicolumn_index
,sql_query_length
, andjoins_per_query
. (Commit) -
Deprecate
update_attributes
/!
in favor ofupdate
/!
. (Commit)
Notable changes
-
Bump the minimum version of the
sqlite3
gem to 1.4. (Pull Request) -
Add
rails db:prepare
to create a database if it doesn't exist, and run its migrations. (Pull Request) -
Add
after_save_commit
callback as shortcut forafter_commit :hook, on: [ :create, :update ]
. (Pull Request) -
Add
ActiveRecord::Relation#extract_associated
for extracting associated records from a relation. (Pull Request) -
Add
ActiveRecord::Relation#annotate
for adding SQL comments to ActiveRecord::Relation queries. (Pull Request) -
Add support for setting Optimizer Hints on databases. (Pull Request)
-
Add
insert_all
/insert_all!
/upsert_all
methods for doing bulk inserts. (Pull Request) -
Add
rails db:seed:replant
that truncates tables of each database for the current environment and loads the seeds. (Pull Request) -
Add
reselect
method, which is a short-hand forunscope(:select).select(fields)
. (Pull Request) -
Add negative scopes for all enum values. (Pull Request)
-
Add
#destroy_by
and#delete_by
for conditional removals. (Pull Request) -
Add the ability to automatically switch database connections. (Pull Request)
-
Add the ability to prevent writes to a database for the duration of a block. (Pull Request)
-
Add an API for switching connections to support multiple databases. (Pull Request)
-
Make timestamps with precision the default for migrations. (Pull Request)
-
Support
:size
option to change text and blob size in MySQL. (Pull Request) -
Set both the foreign key and the foreign type columns to NULL for polymorphic associations on
dependent: :nullify
strategy. (Pull Request) -
Allow a permitted instance of
ActionController::Parameters
to be passed as an argument toActiveRecord::Relation#exists?
. (Pull Request) -
Add support in
#where
for endless ranges introduced in Ruby 2.6. (Pull Request) -
Make
ROW_FORMAT=DYNAMIC
a default create table option for MySQL. (Pull Request) -
Add the ability to disable scopes generated by
ActiveRecord.enum
. (Pull Request) -
Make implicit ordering configurable for a column. (Pull Request)
-
Bump the minimum PostgreSQL version to 9.3, dropping support for 9.1 and 9.2. (Pull Request)
-
Make the values of an enum frozen, raising an error when attempting to modify them. (Pull Request)
-
Make the SQL of
ActiveRecord::StatementInvalid
errors its own error property and include SQL binds as a separate error property. (Pull Request) -
Add an
:if_not_exists
option tocreate_table
. (Pull Request) -
Add support for multiple databases to
rails db:schema:cache:dump
andrails db:schema:cache:clear
. (Pull Request) -
Add support for hash and url configs in database hash of
ActiveRecord::Base.connected_to
. (Pull Request) -
Add support for default expressions and expression indexes for MySQL. (Pull Request)
-
Add an
index
option forchange_table
migration helpers. (Pull Request) -
Fix
transaction
reverting for migrations. Previously, commands inside of atransaction
in a reverted migration ran uninverted. This change fixes that. (Pull Request) -
Allow
ActiveRecord::Base.configurations=
to be set with a symbolized hash. (Pull Request) -
Fix the counter cache to only update if the record is actually saved. (Pull Request)
-
Add expression indexes support for the SQLite adapter. (Pull Request)
-
Allow subclasses to redefine autosave callbacks for associated records. (Pull Request)
-
Bump the minimum MySQL version to 5.5.8. (Pull Request)
-
Use the utf8mb4 character set by default in MySQL. (Pull Request)
-
Add the ability to filter out sensitive data in
#inspect
(Pull Request, Pull Request) -
Change
ActiveRecord::Base.configurations
to return an object instead of a hash. (Pull Request) -
Add database configuration to disable advisory locks. (Pull Request)
-
Update SQLite3 adapter
alter_table
method to restore foreign keys. (Pull Request) -
Allow the
:to_table
option ofremove_foreign_key
to be invertible. (Pull Request) -
Fix default value for MySQL time types with specified precision. (Pull Request)
-
Fix the
touch
option to behave consistently withPersistence#touch
method. (Pull Request) -
Raise an exception for duplicate column definitions in Migrations. (Pull Request)
-
Bump the minimum SQLite version to 3.8. (Pull Request)
-
Fix parent records to not get saved with duplicate children records. (Pull Request)
-
Ensure
Associations::CollectionAssociation#size
andAssociations::CollectionAssociation#empty?
use loaded association ids if present. (Pull Request) -
Add support to preload associations of polymorphic associations when not all the records have the requested associations. (Commit)
-
Add
touch_all
method toActiveRecord::Relation
. (Pull Request) -
Add
ActiveRecord::Base.base_class?
predicate. (Pull Request) -
Add custom prefix/suffix options to
ActiveRecord::Store.store_accessor
. (Pull Request) -
Add
ActiveRecord::Base.create_or_find_by
/!
to deal with the SELECT/INSERT race condition inActiveRecord::Base.find_or_create_by
/!
by leaning on unique constraints in the database. (Pull Request) -
Add
Relation#pick
as short-hand for single-value plucks. (Pull Request)
Active Storage
Please refer to the Changelog for detailed changes.
Removals
Deprecations
-
Deprecate
config.active_storage.queue
in favor ofconfig.active_storage.queues.analysis
andconfig.active_storage.queues.purge
. (Pull Request) -
Deprecate
ActiveStorage::Downloading
in favor ofActiveStorage::Blob#open
. (Commit) -
Deprecate using
mini_magick
directly for generating image variants in favor ofimage_processing
. (Commit) -
Deprecate
:combine_options
in Active Storage's ImageProcessing transformer without replacement. (Commit)
Notable changes
-
Add support for generating BMP image variants. (Pull Request)
-
Add support for generating TIFF image variants. (Pull Request)
-
Add support for generating progressive JPEG image variants. (Pull Request)
-
Add
ActiveStorage.routes_prefix
for configuring the Active Storage generated routes. (Pull Request) -
Generate a 404 Not Found response on
ActiveStorage::DiskController#show
when the requested file is missing from the disk service. (Pull Request) -
Raise
ActiveStorage::FileNotFoundError
when the requested file is missing forActiveStorage::Blob#download
andActiveStorage::Blob#open
. (Pull Request) -
Add a generic
ActiveStorage::Error
class that Active Storage exceptions inherit from. (Commit) -
Persist uploaded files assigned to a record to storage when the record is saved instead of immediately. (Pull Request)
-
Optionally replace existing files instead of adding to them when assigning to a collection of attachments (as in
@user.update!(images: [ … ])
). Useconfig.active_storage.replace_on_assign_to_many
to control this behavior. (Pull Request, Pull Request) -
Add the ability to reflect on defined attachments using the existing Active Record reflection mechanism. (Pull Request)
-
Add
ActiveStorage::Blob#open
, which downloads a blob to a tempfile on disk and yields the tempfile. (Commit) -
Support streaming downloads from Google Cloud Storage. Require version 1.11+ of the
google-cloud-storage
gem. (Pull Request) -
Use the
image_processing
gem for Active Storage variants. This replaces usingmini_magick
directly. (Pull Request)
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 toActiveModel::Errors
. (Pull Request) -
Add
ActiveModel::Errors#of_kind?
to check presence of a specific error. (Pull Request) -
Fix
ActiveModel::Serializers::JSON#as_json
method for timestamps. (Pull Request) -
Fix numericality validator to still use value before type cast except Active Record. (Pull Request)
-
Fix numericality equality validation of
BigDecimal
andFloat
by casting toBigDecimal
on both ends of the validation. (Pull Request) -
Fix year value when casting a multiparameter time hash. (Pull Request)
-
Type cast falsy boolean symbols on boolean attribute as false. (Pull Request)
-
Return correct date while converting parameters in
value_from_multiparameter_assignment
forActiveModel::Type::Date
. (Pull Request) -
Fall back to parent locale before falling back to the
:errors
namespace while fetching error translations. (Pull Request)
Active Support
Please refer to the Changelog for detailed changes.
Removals
-
Remove deprecated
#acronym_regex
method fromInflections
. (Commit) -
Remove deprecated
Module#reachable?
method. (Commit) -
Remove
Kernel#`
without any replacement. (Pull Request)
Deprecations
-
Deprecate using negative integer arguments for
String#first
andString#last
. (Pull Request) -
Deprecate
ActiveSupport::Multibyte::Unicode#downcase/upcase/swapcase
in favor ofString#downcase/upcase/swapcase
. (Pull Request) -
Deprecate
ActiveSupport::Multibyte::Unicode#normalize
andActiveSupport::Multibyte::Chars#normalize
in favor ofString#unicode_normalize
. (Pull Request) -
Deprecate
ActiveSupport::Multibyte::Chars.consumes?
in favor ofString#is_utf8?
. (Pull Request) -
Deprecate
ActiveSupport::Multibyte::Unicode#pack_graphemes(array)
andActiveSupport::Multibyte::Unicode#unpack_graphemes(string)
in favor ofarray.flatten.pack("U*")
andstring.scan(/\X/).map(&:codepoints)
, respectively. (Pull Request)
Notable changes
-
Add support for parallel testing. (Pull Request)
-
Make sure that
String#strip_heredoc
preserves frozen-ness of strings. (Pull Request) -
Add
String#truncate_bytes
to truncate a string to a maximum bytesize without breaking multibyte characters or grapheme clusters. (Pull Request) -
Add
private
option todelegate
method in order to delegate to private methods. This option acceptstrue/false
as the value. (Pull Request) -
Add support for translations through I18n for
ActiveSupport::Inflector#ordinal
andActiveSupport::Inflector#ordinalize
. (Pull Request) -
Add
before?
andafter?
methods toDate
,DateTime
,Time
, andTimeWithZone
. (Pull Request) -
Fix bug where
URI.unescape
would fail with mixed Unicode/escaped character input. (Pull Request) -
Fix bug where
ActiveSupport::Cache
would massively inflate the storage size when compression was enabled. (Pull Request) -
Redis cache store:
delete_matched
no longer blocks the Redis server. (Pull Request) -
Fix bug where
ActiveSupport::TimeZone.all
would fail when tzinfo data for any timezone defined inActiveSupport::TimeZone::MAPPING
was missing. (Pull Request) -
Add
Enumerable#index_with
which allows creating a hash from an enumerable with the value from a passed block or a default argument. (Pull Request) -
Allow
Range#===
andRange#cover?
methods to work withRange
argument. (Pull Request) -
Support key expiry in
increment/decrement
operations of RedisCacheStore. (Pull Request) -
Add cpu time, idle time, and allocations features to log subscriber events. (Pull Request)
-
Add support for event object to the Active Support notification system. (Pull Request)
-
Add support for not caching
nil
entries by introducing new optionskip_nil
forActiveSupport::Cache#fetch
. (Pull Request) -
Add
Array#extract!
method which removes and returns the elements for which block returns a true value. (Pull Request) -
Keep an HTML-safe string HTML-safe after slicing. (Pull Request)
-
Add support for tracing constant autoloads via logging. (Commit)
-
Define
unfreeze_time
as an alias oftravel_back
. (Pull Request) -
Change
ActiveSupport::TaggedLogging.new
to return a new logger instance instead of mutating the one received as argument. (Pull Request) -
Treat
#delete_prefix
,#delete_suffix
and#unicode_normalize
methods as non HTML-safe methods. (Pull Request) -
Fix bug where
#without
forActiveSupport::HashWithIndifferentAccess
would fail with symbol arguments. (Pull Request) -
Rename
Module#parent
,Module#parents
, andModule#parent_name
tomodule_parent
,module_parents
, andmodule_parent_name
. (Pull Request) -
Add
ActiveSupport::ParameterFilter
. (Pull Request) -
Fix issue where duration was being rounded to a full second when a float was added to the duration. (Pull Request)
-
Make
#to_options
an alias for#symbolize_keys
inActiveSupport::HashWithIndifferentAccess
. (Pull Request) -
Don't raise an exception anymore if the same block is included multiple times for a Concern. (Pull Request)
-
Preserve key order passed to
ActiveSupport::CacheStore#fetch_multi
. (Pull Request) -
Fix
String#safe_constantize
to not throw aLoadError
for incorrectly cased constant references. (Pull Request) -
Add
Hash#deep_transform_values
andHash#deep_transform_values!
. (Commit) -
Add
ActiveSupport::HashWithIndifferentAccess#assoc
. (Pull Request) -
Add
before_reset
callback toCurrentAttributes
and defineafter_reset
as an alias ofresets
for symmetry. (Pull Request) -
Revise
ActiveSupport::Notifications.unsubscribe
to correctly handle Regex or other multiple-pattern subscribers. (Pull Request) -
Add new autoloading mechanism using Zeitwerk. (Commit)
-
Add
Array#including
andEnumerable#including
to conveniently enlarge a collection. (Commit) -
Rename
Array#without
andEnumerable#without
toArray#excluding
andEnumerable#excluding
. Old method names are retained as aliases. (Commit) -
Add support for supplying
locale
totransliterate
andparameterize
. (Pull Request) -
Fix
Time#advance
to work with dates before 1001-03-07. (Pull Request) -
Update
ActiveSupport::Notifications::Instrumenter#instrument
to allow not passing block. (Pull Request) -
Use weak references in descendants tracker to allow anonymous subclasses to be garbage collected. (Pull Request)
-
Calling test methods with
with_info_handler
method to allow minitest-hooks plugin to work. (Commit) -
Preserve
html_safe?
status onActiveSupport::SafeBuffer#*
. (Pull Request)
Active Job
Please refer to the Changelog for detailed changes.
Removals
- Remove support for Qu gem. (Pull Request)
Deprecations
Notable changes
-
Add support for custom serializers for Active Job arguments. (Pull Request)
-
Add support for executing Active Jobs in the timezone in which they were enqueued. (Pull Request)
-
Allow passing multiple exceptions to
retry_on
/discard_on
. (Commit) -
Allow calling
assert_enqueued_with
andassert_enqueued_email_with
without a block. (Pull Request) -
Wrap the notifications for
enqueue
andenqueue_at
in thearound_enqueue
callback instead ofafter_enqueue
callback. (Pull Request) -
Allow calling
perform_enqueued_jobs
without a block. (Pull Request) -
Allow calling
assert_performed_with
without a block. (Pull Request) -
Add
:queue
option to job assertions and helpers. (Pull Request) -
Add hooks to Active Job around retries and discards. (Pull Request)
-
Add a way to test for subset of arguments when performing jobs. (Pull Request)
-
Include deserialized arguments in jobs returned by Active Job test helpers. (Pull Request)
-
Allow Active Job assertion helpers to accept Proc for
only
keyword. (Pull Request) -
Drop microseconds and nanoseconds from the job arguments in assertion helpers. (Pull Request)
Ruby on Rails Guides
Please refer to the Changelog for detailed changes.
Notable changes
-
Add Multiple Databases with Active Record guide. (Pull Request)
-
Add a section about troubleshooting of autoloading constants. (Commit)
-
Add Action Mailbox Basics guide. (Pull Request)
-
Add Action Text Overview guide. (Pull Request)
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.