| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
If you pass a hash-like object to preload associations (for example ActionController::Parameters)
preloader will fail with the ArgumentError.
This change allows passing objects that may be converted to a Hash or String into a preloader
|
|\
| |
| | |
Use the same option for create database statements
|
|/
|
|
| |
travis.rb
|
| |
|
|\
| |
| | |
Stringify database configurations
|
| | |
|
|\ \
| | |
| | | |
[CaptureHelperTest] Fix a content_for test description
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
`counter_cache_target` is called only when updated counter cache in
replacing target, but it was already removed at #33913.
|
| | | |
|
| | | |
|
|\ \ \
| | | |
| | | | |
This patch removes deprecated catch-all routes from AM
|
| | | |
| | | |
| | | |
| | | | |
It also removes a monkey patch from AM::Base
|
|\ \ \ \
| | | | |
| | | | | |
Remove deprecated catch-all route in the AV tests
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
We should be able to remove this once the catch-all route is gone from
AP
|
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This commit removes a deprecated catch-all route in the AV tests. It
defines and includes the necessary routes for each test such that we
don't need the catch-all anymore.
This also helps push us toward #33970
|
|\ \ \ \
| | | | |
| | | | | |
Abandon TOP support.
|
|/ / / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Initially, `TOP` was introduced to support `limit` for MSSQL database.
Unlike PostgreSQL/MySQL/SQLite, MSSQL does not have native `LIMIT`/`OFFSET` support.
The commit adding `TOP` is 1a246f71616cf246a75ef6cbdb56032e43d4e643.
However, it figured out that `TOP` implementation was weak and it's not sufficient
to also support `OFFSET`, then `TOP` was substituted with
`ROW_NUMBER()` subquery in be48ed3071fd6524d0145c4ad3faeb4aafe3eda3.
This is a well known trick in MSSQL -
https://stackoverflow.com/questions/2135418/equivalent-of-limit-and-offset-for-sql-server.
So now we don't need this `visit_Arel_Nodes_Top` at all.
It does nothing useful but also adds an extra space after `SELECT` when `LIMIT` is being
used for **any** database.
|
|\ \ \ \
| | | | |
| | | | | |
Fix rails guides markdown.rb and renderer.rb to use custom header id
|
| | | | | |
|
|\ \ \ \ \
| |_|_|_|/
|/| | | | |
Improve phrasing of one sentence in the contributing guide
|
| | | | | |
|
|\ \ \ \ \
| |/ / / /
|/| | | | |
Eagerly define attribute methods in production
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
The attribute methods for a model are currently defined lazily the first
time that model is instantiated, even when `config.eager_load` is true.
This means the first request to use each model incurs the cost, which
usually involves a database round trip to fetch the schema definition.
By defining the attribute methods for all models while the application
is booting, we move that work out of any individual request. When using
a forking web server, this also reduces the number of times the schema
definition is queried by doing it once in the parent process instead of
from each forked process during their first request.
|
|\ \ \ \ \
| |/ / / /
|/| | | | |
update mini_magick to the latest version
|
|/ / / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
v 4.9.2 avoids some warnings that show in our tests.
Although Gemfile.lock currently specifies 4.8.0, the CI already runs 4.9.2
so 4.8.0 warnings do not show in our CI logs.
|
| | | |
| | | |
| | | |
| | | | |
Similar to Action View's and Action Controller's instrument helpers.
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
Encode Content-Disposition filenames on send_data and send_file
|
| | | | | |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Remove private def
|
| | | | | | |
|
|\ \ \ \ \ \
| |_|_|/ / /
|/| | | | | |
Added mandatory region and bucket
|
| |/ / / /
| | | | |
| | | | | |
The 'setup' section was misleadingly leaving out :bucket and :region in the sample, but servers don't start without them.
|
|\ \ \ \ \
| |/ / / /
|/| | | | |
Enable `Performance/UnfreezeString` cop
|
|/ / / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
In Ruby 2.3 or later, `String#+@` is available and `+@` is faster than `dup`.
```ruby
# frozen_string_literal: true
require "bundler/inline"
gemfile(true) do
source "https://rubygems.org"
gem "benchmark-ips"
end
Benchmark.ips do |x|
x.report('+@') { +"" }
x.report('dup') { "".dup }
x.compare!
end
```
```
$ ruby -v benchmark.rb
ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux]
Warming up --------------------------------------
+@ 282.289k i/100ms
dup 187.638k i/100ms
Calculating -------------------------------------
+@ 6.775M (± 3.6%) i/s - 33.875M in 5.006253s
dup 3.320M (± 2.2%) i/s - 16.700M in 5.032125s
Comparison:
+@: 6775299.3 i/s
dup: 3320400.7 i/s - 2.04x slower
```
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Before this change this test was passing even if we revert #31135. The
reason for that is that `app 'development'` will load the environment in
the test process and it is happening before db_create_and_drop is
called.
This was not asserting that the environment was loaded in the db:create
task itself.
To test it we enhance the db:create task with a block that writes to a
tmp file the value of the config. If the environment is loaded before
that task enhancement runs the content of the file will have "true"
insteand of "false".
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
Let escape_javascript handle conversion to string
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This brings `escape_javascript` in line with the behavior of `json_escape` and
allows other value types to be output without needing explicit casting in the
view template.
Example:
<%= javascript_tag do %>
var locale = '<%== j I18n.locale %>'; // locale is a symbol
<% end %>
|
| | | | | |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
[close #33907] Error when using "recyclable" cache keys with a store that does not support it
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
- Moving the `supports_cache_versioning?` check to a class method.
- Shorten the method doc.
- Expand on the error message.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
does not support it
If you are using the "in cache versioning" also known as "recyclable cache keys" the cache store must be aware of this scheme, otherwise you will generate cache entries that never invalidate.
This PR adds a check to the initialization process to ensure that if recyclable cache keys are being used via
```
config.active_record.cache_versioning = true
```
Then the cache store needs to show that it supports this versioning scheme. Cache stores can let Rails know that they support this scheme by adding a method `supports_in_cache_versioning?` and returning true.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Replace line items with chapters [ci skip]
|
|/ / / / / /
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Line items are a holdover from when orders were used in the examples
instead of books.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Add missing test case for `redirect_to` when request includes a port.
|
| | | | | | | |
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
schneems/schneems/collection-caching-easier-to-understand
[ci skip] document collection_caching.rb
|