| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
The output of `.databases` in SQLite will truncate to a certain size.
This causes the test to fail when run locally from a mac, or anything
which has a tempdir with more than a few characters. This pragma has
the same output, but presented as a normal query, meaning no truncation
will occur.
|
|\ \ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
koic/fix_test_add_column_with_timestamp_type_oracle
Fix `test_add_column_with_timestamp_type` when using Oracle
|
| |/ / / / |
|
|\ \ \ \ \
| |_|/ / /
|/| | | | |
Stop creating ApplicationRecord on model generation
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
When generating models, we created ApplicationRecord in the default
location if no file existed there. That was annoying for people who
moved it to somewhere else in the autoload path. At this point, the
vast majority of apps should have either run the upgrade script or
generated a model since upgrading. For those that haven't the error
message after generating a new model should be helpful:
NameError: uninitialized constant ApplicationRecord
To ease friction in that case, this also adds a generator for
ApplicationRecord.
|
|\ \ \ \ \
| |_|/ / /
|/| | | | |
[ci skip] Add documentation for after_create_commit and after_update_commit callbacks
|
|/ / / /
| | | |
| | | |
| | | | |
callbacks
|
|\ \ \ \
| | | | |
| | | | | |
Make actionpack frozen string friendly
|
| |/ / / |
|
|\ \ \ \
| | | | |
| | | | | |
Fix `warning: ambiguous first argument`
|
|/ / / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This fixes the following warning:
```
railties/test/application/rake/dbs_test.rb:265: warning: ambiguous first argument; put parentheses or a space even after `/' operator
```
|
|\ \ \ \
| | | | |
| | | | | |
[API DOCUMENTATION] [MINOR] Correct description of ActionController::Parameters#delete
|
| | | | | |
|
| | | | | |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
remove depreciated assertion to eliminate warning
|
| | |_|/ /
| |/| | |
| | | | |
| | | | | |
Signed-off-by: Yuki Nishijima <yk.nishijima@gmail.com>
|
|\ \ \ \ \
| |/ / / /
|/| | | |
| | | | |
| | | | | |
deivid-rodriguez/follow_up_to_multiple_location_engine_mounting
Fix regression introduced by fixing mounting the same engine in multiple locations
|
| | | | | |
|
|\ \ \ \ \
| | | | | |
| | | | | |
| | | | | | |
Update rack-test dependency constraint
|
| | | | | | |
|
|\ \ \ \ \ \
| |_|_|_|/ /
|/| | | | |
| | | | | |
| | | | | | |
xtina-starr/suppress-warning-from-actionview-controller-helper
Suppress warning from actionview controller helper.
|
|/ / / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Explicitly pass a destructed array to the delegate method.
Signed-off-by: Yuki Nishijima <yk.nishijima@gmail.com>
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Use frozen string literal in actionview/
|
| | | | | | |
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Fix warnings in railties tests
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
This warning has been fixed in sass-rails. This change picks up the fix.
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Fix `COUNT(DISTINCT ...)` with `ORDER BY` and `LIMIT`
|
| | | | | | | | |
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Since #26972, `ORDER BY` is kept if `LIMIT` is presented for
performance. But in most SQL servers (e.g. PostgreSQL, SQL Server, etc),
`ORDER BY` expressions must appear in select list for `SELECT DISTINCT`.
We should not replace existing select list in that case.
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
Fix `warning: assigned but unused variable - comment`
|
|/ / / / / / / /
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
```
% ARCONN=sqlite3 be ruby -w -Itest test/cases/associations/belongs_to_associations_test.rb -n test_multiple_counter_cache_with_after_create_update
test/cases/associations/belongs_to_associations_test.rb:1181: warning: assigned but unused variable - comment
Using sqlite3
Run options: -n test_multiple_counter_cache_with_after_create_update --seed 49644
.
Finished in 0.114266s, 8.7515 runs/s, 17.5030 assertions/s.
1 runs, 2 assertions, 0 failures, 0 errors, 0 skips
```
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
Do not show URL in boot info when using Puma
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Puma has its own configuration file(e.g. `config/puma.rb`).
Can define a port and a URL to bind in the configuration file. Therefore,
on Rails side, can not grasp which URI to bind finally.
Because of that, it may show a URL different from the actually bound
URL, so I think that it is better not to show it.
Fixes #29880
|
|\ \ \ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | | |
Move generator namespacing to Base
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
Generators need to be aware of namespace to work properly in engines.
Methods to help with this lived in Rails::Generators::NamedBase. Moving
them to Rails::Generators::Base (which NamedBase inherits from) allows a
follow-up in which a namespace aware unnamed generator can be created.
|
|\ \ \ \ \ \ \ \ \ \
| | | | | | | | | | |
| | | | | | | | | | | |
Delegate respond_to? in ActionView::Helpers::ControllerHelper
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
Since methods defined in the controller helper are mostly delegated to
the controller, delegate respond_to? as well, so that for example
`respond_to?(:params)` behaves as expected.
|
|\ \ \ \ \ \ \ \ \ \ \
| | | | | | | | | | | |
| | | | | | | | | | | | |
Fix `counter_cache` double increment
|
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | | |
When an `after_create` callback did `update_attributes` on a record with
multiple `belongs_to` associations with counter caches, even numbered
associations would have their counters double-incremented. Fixes to
`ActiveModel::Dirty` in 020abad fixed this.
This adds regression tests for this bug fixed incidentally in the other
commit, which also removed the need for the workaround using
@_after_create_counter_called.
|
|\ \ \ \ \ \ \ \ \ \ \ \
| | | | | | | | | | | | |
| | | | | | | | | | | | | |
Revert "Include rack-mini-profiler by default"
|
|/ / / / / / / / / / / / |
|
|\ \ \ \ \ \ \ \ \ \ \ \
| | | | | | | | | | | | |
| | | | | | | | | | | | | |
Include rack-mini-profiler by default
|
|/ / / / / / / / / / / /
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | | |
I've used many development related performance tools, but the single most consistently helpful tool is `rack-mini-profiler`.
The tool provides a lightweight UI element for each page, that shows the server response time. When clicked it expands to show more detail:
![](https://www.dropbox.com/s/0aciw4mk8c059n0/Screenshot%202017-07-24%2010.24.24.png?dl=1)
This can be used to detect expensive queries, N+1 issues and general performance related problems.
|
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | | |
This also reverts the change to enable prepared statements by default on
MySQL (though I suspect we could enable them and it'd be great). This
change brings back a collector closer to the old `Bind` collector in
Arel. However, this one lives in AR, since this is an AR specific need.
Additionally, we only use it for statement caching, since the new
substitute collector in Arel is higher performance for most cases.
|
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | | |
Honestly I don't think the tests that are fixed by this change should
have been merged. Passing a range or an array to `where` has a special
meaning. We need to solve the problem more concretely without overriding
the behavior that is present for *every* other type.
However, the damage has been done. These changes were in 5.1, so we need
a deprecation cycle to remove it.
|
|\ \ \ \ \ \ \ \ \ \ \ \
| | | | | | | | | | | | |
| | | | | | | | | | | | | |
Remove duplicated assertion in `test_count_with_join`
|
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | | |
The queries both `res2` and `res3` are completely the same.
And also, `assert_nothing_raised` is covered by following assertion.
|
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | | |
There's an actual bug in 213796fb4936dce1da2f0c097a054e1af5c25c2c around
prepared statements being disabled. I'm looking into it, but in the mean
time this gets the build green so it doesn't block other PRs
|
| |_|_|_|_|_|_|_|_|/ / /
|/| | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | | |
A common source of bugs and code bloat within Active Record has been the
need for us to maintain the list of bind values separately from the AST
they're associated with. This makes any sort of AST manipulation
incredibly difficult, as any time we want to potentially insert or
remove an AST node, we need to traverse the entire tree to find where
the associated bind parameters are.
With this change, the bind parameters now live on the AST directly.
Active Record does not need to know or care about them until the final
AST traversal for SQL construction. Rather than returning just the SQL,
the Arel collector will now return both the SQL and the bind parameters.
At this point the connection adapter will have all the values that it
had before.
A bit of this code is janky and something I'd like to refactor later. In
particular, I don't like how we're handling associations in the
predicate builder, the special casing of `StatementCache::Substitute` in
`QueryAttribute`, or generally how we're handling bind value replacement
in the statement cache when prepared statements are disabled.
This also mostly reverts #26378, as it moved all the code into a
location that I wanted to delete.
/cc @metaskills @yahonda, this change will affect the adapters
Fixes #29766.
Fixes #29804.
Fixes #26541.
Close #28539.
Close #24769.
Close #26468.
Close #26202.
There are probably other issues/PRs that can be closed because of this
commit, but that's all I could find on the first few pages.
|