| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We had previously updated this to attempt to map over whatever was
passed in, so that additional types like range and array could benefit
from this behavior without the time zone converter having to deal with
every known type.
However, the default behavior of a type is to just yield the given value
to `map`, which means that if we don't actually know how to handle a
value, we'll just recurse infinitely. Since both uses of `map` in this
case occur in cases where we know receiving the same object will
recurse, we can just break on reference equality.
Fixes #23241.
|
|\ \ \
| | | |
| | | | |
Remove unnecessary overriding of `#initialize`
|
| | |/
| |/|
| | |
| | |
| | |
| | | |
`#initialize` of `HasManyReflection`, `HasOneReflection` and
`BelongsToReflection` only pass all arguments to `super` by passed order.
These overriding can be removed.
|
|\ \ \
| |/ /
|/| | |
Change command_task.rb to commands_task.rb in docs
|
|/ /
| |
| | |
The initialization documentation references `rails/commands/command_task.rb`. This appears to be a typo as the file is actually `rails/commands/commands_task.rb`.
|
|\ \
| | |
| | | |
Warn if a named scope is overwriting an existing scope or method
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This reverts commit f6db31ec16e42ee7713029f7120f0b011d1ddc6c.
Reason:
Scope names can very easily conflict, particularly when sharing Concerns
within the team, or using multiple gems that extend AR models.
It is true that Ruby has the ability to detect this with the -w option, but the
reality is that we are depending on too many gems that do not care about Ruby
warnings, therefore it might not be a realistic solution to turn this switch on
in our real-world apps.
|
|\ \ \
| | | |
| | | | |
move `test_generator_if_skip_action_cable_is_given_for_an_api_app` to the appropriate file
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
appropriate file
Test of Rails API should be in `api_app_generator_test.rb`.
|
|\ \ \ \
| | | | |
| | | | | |
Duplicate assert_generates options before modifying it
|
| | | | | |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Fix regression in `Hash#dig` for HashWithIndifferentAccess.
|
|/ / / / / |
|
| |/ / /
|/| | |
| | | |
| | | |
| | | |
| | | | |
Generated engines should call `protect_from_forgery`. If this method
isn't called, then the Engine could be susceptible to XSS attacks.
Thanks @tomekr for reporting this to us!
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
Update CHANGELOG.md
|
|/ / / /
| | | |
| | | | |
fix indentation to show it as code
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
And improve changelongs.
[ci skip]
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
Fix corrupt transaction state caused by `before_commit` exceptions
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
When a `before_commit` callback raises, the database is rolled back but
AR's record of the current transaction is not, leaving the connection in
a perpetually broken state that affects all future users of the
connection: subsequent requests, jobs, etc. They'll think a transaction
is active when none is, so they won't BEGIN on their own. This manifests
as missing `after_commit` callbacks and broken ROLLBACKs.
This happens because `before_commit` callbacks fire before the current
transaction is popped from the stack, but the exception-handling path
they hit assumes that the current transaction was already popped. So the
database ROLLBACK is issued, but the transaction stack is left intact.
Common cause: deadlocked `#touch`, which is now implemented with
`before_commit` callbacks.
What's next:
* We shouldn't allow active transaction state when checking in or out
from the connection pool. Verify that conns are clean.
* Closer review of txn manager sad paths. Are we missing other spots
where we'd end up with incorrect txn state? What's the worst that can
happen if txn state drifts? How can we guarantee it doesn't and
contain the fallout if it does?
Thanks for @tomafro for expert diagnosis!
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Solves personal insanity, since I was down in these files.
(Please don't submit PRs like this.)
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Some places were saying filter, while others said filter_options, spare the ambiguity
and use filter throughout.
This inlines a needless local variable and clarifies a route filter consists of defaults
and values to match against.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Assume the filter is a string, if it wasn't a hash and isn't nil. Remove needless else
and rely on Ruby's default nil return.
Add spaces within hash braces.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Add options for rake routes task
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Add two options: `-c` and `-g`.
`-g` option returns the urls name, verb and path fields that match the pattern.
`-c` option returns the urls for specific controller.
Fixes #18902, and Fixes #20420
[Anton Davydov & Vipul A M]
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This reverts commit 9f3730a516f30beb0050caea9539f8d6b808e58a, reversing
changes made to 2637fb75d82e1c69333855abd58c2470994995d3.
There are additional issues with this commit that need to be addressed
before this change is ready (see #23377). This is a temporary revert in
order for us to have more time to address the issues with that PR,
without blocking the release of beta2.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Address remaining known issues in Interlock
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
While we know no user code is running, we should do as much loading as
we can. That way, all the threads will then be able to resume running
user code together.
Otherwise, only the last arriving thread would get to do its load, and
would then return to userspace, leaving the others still blocked.
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
We mostly care about `reload_classes_only_on_change=true`, because
that's the default... and there, we definitely need to wait for the lock
when necessary.
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
.git added to https repo urls
|
| | | | | | | | |
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
Add documentation for #17573
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Fixes some parts of #23148.
[ci skip]
|
|\ \ \ \ \ \ \ \ \
| | |/ / / / / / /
| |/| | | / / / /
| |_|_|_|/ / / /
|/| | | | | | | |
git protocol replaced with https
|
| | | | | | | | |
|
|\ \ \ \ \ \ \ \
| |_|/ / / / / /
|/| | | | | | |
| | | | | | | |
| | | | | | | | |
yahonda/shorten_internal_metadata_table_name_less_than_30_byte
Shorten ActiveRecord::InternalMetadata.table_name to ar_internal_metadata
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
for those who already migrated to Rails 5.0.0 beta
|
| |/ / / / / /
| | | | | | |
| | | | | | |
| | | | | | | |
to support Oracle database which only supports 30 byte identifier length
|
|\ \ \ \ \ \ \
| |_|_|/ / / /
|/| | | | | | |
[ci skip] Properly indent code in markdown
|
|/ / / / / /
| | | | | |
| | | | | |
| | | | | | |
[ci skip]
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Add Default Puma Config
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
When the `puma` command is run without any configuration options it will detect presence of a `config/puma.rb` file and use that. Currently there is discrepancy between `puma` command and `rails server` but Evan said it would be reasonable to add in reading in config from the default location. I am working on that right now as a feature in puma/puma.
Why do we need this? By default Puma uses 16 threads, and by default ActiveRecord only has 5 threads. Due to the architecture of AR it is guaranteed that if you're running with fewer DB connections than your server has threads you will hit `ActiveRecord::ConnectionTimeoutError ` eventually if your app gets modest amounts of traffic. Since we are providing a default webserver, we should provide reasonable configuration for that webserver.
This PR does a few things, first it sets the default Puma thread count to 5 to mach ActiveRecord's default. It sets the default environment to `"development"` and the default port to 300 so that booting the server with `$ puma` will give you the same default port as `rails server`. It is worth mentioning that by reading in from `PORT` environment variable this config can work with containerized deployments, such as on Heroku.
We are not using worker processes by default, that way JRuby and windows devs can use this configuration without modification. I went ahead and included a default `on_worker_boot`. It won't be used unless a worker count is specified, that means this config will not use it. Even though it's not being used now It will make someone who wants to try modifying their config to run extra workers easier.
cc/ @pixeltrix
|
|\ \ \ \ \ \ \
| |_|_|/ / / /
|/| | | | | | |
Change default ACa adapter for development & test
|
| | | | | | | |
|
|\ \ \ \ \ \ \
| |_|_|/ / / /
|/| | | | | | |
Redis sans EventMachine
|