The ordering examples use `Customer#orders_count` for ordering which
results in beginner-unfriendly examples like:
Customer.order(:orders_count)
Having two unrelated types of `order` can be confusing.
As Customer has many Orders it's probably better to replace the Customer
with Book to avoid any confusion.
Not having `orders_count` also makes it easier to grep for 'order' in
the guide. This also is a reason the `Order.none` example is replaced
with `Book.none`, besides it being more consistent with the example
below it.
Co-authored-by: Ryuta Kamizono <kamipo@gmail.com>
In #42794 we added the ability to hide some configurations for database
tasks. This is useful if you want your application to connect to a
database but if it's a separate service not run any tasks against it.
After adding this functionality I realized that the `configs_for`
argument no longer makes sense. `include_replicas` would include all of
them but ones with `database_tasks: false` aren't necessarily replicas.
This change deprecates `include_replicas` in favor of `include_hidden`
which will display all configurations. When not passed, this will
continue to return all writing connections that we want to perform tasks
on.
I found an unexpected use of assertion in the block of `assert_raise`
when I implemented https://github.com/rubocop/rubocop-minitest/pull/137.
It is expected to be asserted after an exception is raised in
`assert_raise` block, but in actually it is not asserted after an
exception is raised. Therefore, this PR removes or updates assertions
that have not been asserted after an exception has raised.
This PR will add `rubocop-minitest` and enable
`Minitest/UnreachableAssertion` cop to able similar auto-detection,
but will remove `rubocop-minitest` from this PR if you don't like it.
There is no need for this nowadays. you could have a directory somehwere
that is not in autoload_paths, but you want the once loader to manage.
At the same time, when we setup the main loader, we remove any directory
in the autoload_once_paths, since Zeitwerk does not allow loaders to
have overlapping root directories.
Followup to #42794. This fixes a rubocop failure for the spacing before
the curly brace and uses a more common/correct approach to testing the
error message.
Add `weekday_select` method
Create `Tags::WeekdaySelect` class
Add `weekday_select` to `FromBuilder`
Add Documentation
Allow `WeekdaySelect` to use selected option if value is nil
Doc fix
Add tests
Use kwrd args
Update CHANGELOG
Fix `Tags::WeekdaySelect` for updated kwrd args
Update CHANGELOG format
Condense `weekday_options_for_select` method
Update tests for kwargs
https://github.com/rails/rails/pull/39935 changed the behavior of
`Path::Pattern#spec` and `Route#ast` to return an `Ast` rather than the
root `Node`. After eager loading, however, we clear out the `Ast` to
limit retained memory and these methods return `nil`.
While these methods are not public and they aren't used internally after
eager loading, having them return `nil` makes it difficult for
applications that had been using these methods to get access to the
root `Node`.
This commit restores the behavior of these two methods to return the
root `Node`. The `Ast` is still available via `Path::Pattern#ast`, and
we still clear it out after eager loading.
Now that spec is a `Node` and not an `Ast` masquerading as one, we can
get rid of the delegate methods on `Ast.
Since `Route#ast` now returns the root `Node`, the newly added
`Route#ast_root` is no longer necessary so I've removed it.
I also removed the unused `@decorated_ast` method, which should have
been removed in https://github.com/rails/rails/pull/39935.
* Remove spring as a default installation option
Faster computers have meant that most apps won't see a big benefit from Spring on small to moderate size apps. Thus the pain of dealing with the occasional spring issue is no longer warranted by default.
* Errant end
* No longer an option
* Additional spring removals
* Pointer to docs is enough