| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Related to https://github.com/rails/rails/pull/33953
|
|
|
|
| |
- Followup of https://github.com/rails/rails/pull/34051
|
|\
| |
| | |
Update js docs after the webpacker changes
|
| | |
|
| | |
|
|/
|
|
|
|
|
|
| |
- I found this weird that the LoggerSilence wasn't using the
`ActiveSupport` namespace (AFAIK all other classes have it).
This PR deprecate the use of `LoggerSilence` for
`ActiveSupport::LoggerSilence` instead.
|
| |
|
|
|
|
|
|
| |
Previously the documentation for expires_in suggested that the option
was available for all cache stores. This clarifies that the behavior can
be supported, but is not always supported.
|
|\
| |
| | |
Update guide for validation custom contexts [ci skip]
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The Active Record validations guide's section on custom contexts appears
to be incomplete. the code sample shows a context being added to
validations, but not being used.
Add to the sample code for this section by showing validations being run
with and without the custom context. Add a second sample code block
showing that validations with no context are also run, when a context is
used.
|
|\ \
| | |
| | |
| | |
| | | |
Clarify transactional behavior of after_commit and after_rollback callbacks
[ci skip]
|
| | | |
|
|\ \ \
| | | |
| | | | |
[ci skip] Do not recommend testing stored object in template
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Since `assigns` is not placed by default with Rails, we suggested to
test if the right information was displayed instead of suggesting to
test if the right object was stored in the template.
|
|\ \ \ \
| | | | |
| | | | | |
Fix rails guides markdown.rb and renderer.rb to use custom header id
|
| | | | | |
|
| | | | | |
|
|/ / / /
| | | |
| | | | |
The 'setup' section was misleadingly leaving out :bucket and :region in the sample, but servers don't start without them.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Line items are a holdover from when orders were used in the examples
instead of books.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
ambigity -> ambiguity
Related to #33891
|
|\ \ \ \
| | | | |
| | | | | |
Contributing to Ruby on Rails Guide: standardize git remote names [ci skip].
|
| | | | | |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Update MySQL server version and character set in Rails Guide [skip ci]
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Related to #33853
|
|\ \ \ \ \ \
| |/ / / / /
|/| | | | | |
Follow up #33751
|
| |/ / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Add mention about it to the "Active Support Instrumentation" guide
Related to https://github.com/rails/rails/pull/33751#discussion_r214745153
Follow up #33751
|
| | | | | |
|
|/ / / / |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Applications can configure the route prefix prepended to the Active
Storage routes. By default this maintains the previous prefix
`/rails/active_storage` but supports custom prefixes.
Before this change the route for serving blobs is fixed to
`/rails/active_storage/blobs/:signed_id/*filename`. After this change
it's possible to configure the route to something like
`/files/blobs/:signed_id/*filename`.
|
| |/ /
|/| | |
|
| | |
| | |
| | |
| | |
| | | |
Add mention that `config.filter_parameters` also filters out sensitive
values of database columns when call `#inspect` since #33756.
|
| | |
| | |
| | |
| | | |
Add backticks to code
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The name of the minitest library is spelled that way: regular font, and
lowercase. Lowercase is used even at the beginning of sentences, see
http://docs.seattlerb.org/minitest/
I double-checked this with @zenspider too (thanks!).
|
|\ \ \
| |/ /
|/| | |
Skip delivery notification when perform_deliveries is false.
|
| | | |
|
| | | |
|
|/ /
| |
| |
| |
| | |
See `ConnectionUrlResolver#database_from_path` in
`activerecord/lib/active_record/connection_adapters/connection_specification.rb`
|
| | |
|
| |
| |
| |
| | |
Closes #32885.
|
|\ \
| | |
| | | |
Use Turbolinks in Rails guides
|
| | | |
|
| | | |
|
|\ \ \
| | | |
| | | | |
Add hooks to ActiveJob around retries and discards
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
Refactor Active Record configurations
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
While the three-tier config makes it easier to define databases for
multiple database applications, it quickly became clear to offer full
support for multiple databases we need to change the way the connections
hash was handled.
A three-tier config means that when Rails needed to choose a default
configuration (in the case a user doesn't ask for a specific
configuration) it wasn't clear to Rails which the default was. I
[bandaid fixed this so the rake tasks could work](#32271) but that fix
wasn't correct because it actually doubled up the configuration hashes.
Instead of attemping to manipulate the hashes @tenderlove and I decided
that it made more sense if we converted the hashes to objects so we can
easily ask those object questions. In a three tier config like this:
```
development:
primary:
database: "my_primary_db"
animals:
database; "my_animals_db"
```
We end up with an object like this:
```
@configurations=[
#<ActiveRecord::DatabaseConfigurations::HashConfig:0x00007fd1acbded10
@env_name="development",@spec_name="primary",
@config={"adapter"=>"sqlite3", "database"=>"db/development.sqlite3"}>,
#<ActiveRecord::DatabaseConfigurations::HashConfig:0x00007fd1acbdea90
@env_name="development",@spec_name="animals",
@config={"adapter"=>"sqlite3", "database"=>"db/development.sqlite3"}>
]>
```
The configurations setter takes the database configuration set by your
application and turns them into an
`ActiveRecord::DatabaseConfigurations` object that has one getter -
`@configurations` which is an array of all the database objects.
The configurations getter returns this object by default since it acts
like a hash in most of the cases we need. For example if you need to
access the default `development` database we can simply request it as we
did before:
```
ActiveRecord::Base.configurations["development"]
```
This will return primary development database configuration hash:
```
{ "database" => "my_primary_db" }
```
Internally all of Active Record has been converted to use the new
objects. I've built this to be backwards compatible but allow for
accessing the hash if needed for a deprecation period. To get the
original hash instead of the object you can either add `to_h` on the
configurations call or pass `legacy: true` to `configurations.
```
ActiveRecord::Base.configurations.to_h
=> { "development => { "database" => "my_primary_db" } }
ActiveRecord::Base.configurations(legacy: true)
=> { "development => { "database" => "my_primary_db" } }
```
The new configurations object allows us to iterate over the Active
Record configurations without losing the known environment or
specification name for that configuration. You can also select all the
configs for an env or env and spec. With this we can always ask
any object what environment it belongs to:
```
db_configs = ActiveRecord::Base.configurations.configurations_for("development")
=> #<ActiveRecord::DatabaseConfigurations:0x00007fd1acbdf800
@configurations=[
#<ActiveRecord::DatabaseConfigurations::HashConfig:0x00007fd1acbded10
@env_name="development",@spec_name="primary",
@config={"adapter"=>"sqlite3", "database"=>"db/development.sqlite3"}>,
#<ActiveRecord::DatabaseConfigurations::HashConfig:0x00007fd1acbdea90
@env_name="development",@spec_name="animals",
@config={"adapter"=>"sqlite3", "database"=>"db/development.sqlite3"}>
]>
db_config.env_name
=> "development"
db_config.spec_name
=> "primary"
db_config.config
=> { "adapter"=>"sqlite3", "database"=>"db/development.sqlite3" }
```
The configurations object is more flexible than the configurations hash
and will allow us to build on top of the connection management in order
to add support for primary/replica connections, sharding, and
constructing queries for associations that live in multiple databases.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Context https://github.com/rails/rails/pull/33605#discussion_r210354278
Related to #32937, #33605
|
|/ / / /
| | | |
| | | |
| | | |
| | | |
| | | | |
"Configuring Rails Applications" guide [ci skip]
Related to #32937, #33605.
|
|\ \ \ \
| | | | |
| | | | | |
Add "Ruby on Rails 6.0 Release Notes" guide [ci skip]
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This commit adds a skeleton of "Ruby on Rails 6.0 Release Notes".
It isn't a good time to add changelogs' entries to this guide since we can
redo/revert some things till the final release 6.0.
It would be better to do it close to the release.
But we already can add mentions about major features
that have been added to 6.0. I added mention about "Parallel Testing".
|