| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Make sure we have coverage for both the find/build cases
|
| |
|
|
|
|
|
| |
The previous edit kind of de-emphasized that, so changing it to be more explict.
(It also avoids showing it as if it's a string-keyed hash.)
|
|
|
|
|
| |
Also updated the documentation about the new ability to query them normally,
and added test to make sure they work!
|
| |
|
|\
| |
| |
| | |
Allow symbol as values for `tokenizer` of `LengthValidator`
|
| | |
|
|\ \
| | |
| | | |
Correct module name in deprecation message.
|
|/ / |
|
|\ \
| | |
| | | |
Improve deprecation warning message
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
`has_secure_token` hasen't been released yet. No need to track
every change in the CHANGELOG.
|
|\ \ \
| | | |
| | | |
| | | |
| | | | |
morgoth/do-not-overwrite-value-of-secret-token-when-present
Do not overwrite secret token value when already present.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
```
user = User.create(token: "custom-secure-token")
user.token # => "custom-secure-token"
```
|
|\ \ \ \
| |_|/ /
|/| | | |
[ci skip] escape under score
|
| |/ / |
|
|\ \ \
| |/ /
|/| | |
require rack/utils in exception_wrapper
|
|/ / |
|
| |
| |
| |
| |
| | |
there's really no benefit here. It's the same number of lines without
the meta programming and is faster
|
| | |
|
| |
| |
| |
| | |
now we don't have to call reset! everywhere
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We shouldn't cache if it's not absolutely necessary. Removes
route caching and instead skips using the `url_helpers` is the
integration test session doesn't require it. Benchmark ips on
integration and controller index method tests below.
Without any caching or changes to `#url_helpers`:
```
Calculating -------------------------------------
INDEX: Integration Test
71.000 i/100ms
INDEX: Functional Test
99.000 i/100ms
-------------------------------------------------
INDEX: Integration Test
728.878 (± 8.0%) i/s - 3.692k
INDEX: Functional Test
1.015k (± 6.7%) i/s - 5.148k
Comparison:
INDEX: Functional Test: 1015.4 i/s
INDEX: Integration Test: 728.9 i/s - 1.39x slower
```
With caching on `#url_helpers`:
```
Calculating -------------------------------------
INDEX: Integration Test
74.000 i/100ms
INDEX: Functional Test
99.000 i/100ms
-------------------------------------------------
INDEX: Integration Test
752.377 (± 6.9%) i/s - 3.774k
INDEX: Functional Test
1.021k (± 6.7%) i/s - 5.148k
Comparison:
INDEX: Functional Test: 1021.1 i/s
INDEX: Integration Test: 752.4 i/s - 1.36x slower
```
Afer removing the caching and bypassing the `url_helpers` when not
necessary in the session:
```
Calculating -------------------------------------
INDEX: Integration Test
87.000 i/100ms
INDEX: Functional Test
97.000 i/100ms
-------------------------------------------------
INDEX: Integration Test
828.433 (± 6.4%) i/s - 4.176k
INDEX: Functional Test
926.763 (± 7.2%) i/s - 4.656k
Comparison:
INDEX: Functional Test: 926.8 i/s
INDEX: Integration Test: 828.4 i/s - 1.12x slower
```
|
|\ \
| | |
| | | |
Extract `DateTimePrecisionTest`
|
| | |
| | |
| | |
| | | |
The datetime precision tests for any adapters is duplicated.
|
|/ /
| |
| |
| |
| |
| |
| |
| | |
Use SQL COUNT and LIMIT 1 queries for none? and one? methods if no block or limit is given,
instead of loading the entire collection to memory. The any? and many? methods already
follow this behavior.
[Eugene Gilburg & Rafael Mendonça França]
|
|\ \
| | |
| | |
| | |
| | | |
yuki24/guides-add-render-example-without-partial-and-locals
Add tip for skipping `partial` and `locals` options for `render`
|
| | |
| | |
| | |
| | | |
[ci skip]
|
|\ \ \
| | | |
| | | |
| | | | |
ActionController#translate supports symbols
|
| | | | |
|
| | | |
| | | |
| | | |
| | | | |
Made it similar to views helper.
|
|\ \ \ \
| | | | |
| | | | | |
Allow `:precision` option for time type columns
|
| | | | | |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
remove unnecessary assignment/parameter passing in AS::Callbacks...::Around (master branch)
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
ActiveSupport::Callbacks::Filters::Around
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This finally removes the warning "WARNING: there is no transaction in progress"
when running Active Record tests using PostgreSQL.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Also removed some cruft in the `setup` and `teardown` methods.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
"active_support/testing/stream" is already required in `test_case.rb`.
Furthermore the test "test/cases/migration_test.rb" could no longer be executed
directly.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
fix typo in fresh_when example [ci skip]
|
| | | | | | | |
|
|\ \ \ \ \ \ \
| |/ / / / / /
|/| | | | | | |
Schema creation doesn't load the app
|
| | |/ / / /
| |/| | | | |
|
|/ / / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
`coder.represent_scalar` means something along the lines of "Here is a quoted
string, you can just add it to the output", which is not the case here. It only
works for simple strings that can appear unquoted in YAML, but causes problems
for e.g. primitive-like strings ("1", "true").
`coder.represent_object` on the other hand, means that "This is the Ruby-object
representation for this thing suitable for use in YAML dumping", which is what
we want here.
Before:
YAML.load ActiveSupport::SafeBuffer.new("Hello").to_yaml # => "Hello"
YAML.load ActiveSupport::SafeBuffer.new("true").to_yaml # => true
YAML.load ActiveSupport::SafeBuffer.new("false").to_yaml # => false
YAML.load ActiveSupport::SafeBuffer.new("1").to_yaml # => 1
YAML.load ActiveSupport::SafeBuffer.new("1.1").to_yaml # => 1.1
After:
YAML.load ActiveSupport::SafeBuffer.new("Hello").to_yaml # => "Hello"
YAML.load ActiveSupport::SafeBuffer.new("true").to_yaml # => "true"
YAML.load ActiveSupport::SafeBuffer.new("false").to_yaml # => "false"
YAML.load ActiveSupport::SafeBuffer.new("1").to_yaml # => "1"
YAML.load ActiveSupport::SafeBuffer.new("1.1").to_yaml # => "1.1"
If we ever want Ruby to behave more like PHP or JavaScript though, this is an
excellent trick to use ;)
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
In addition to cleaning up the implementation, this allows type casting
behavior to be applied consistently everywhere. (#where for example). A
good example of this was the previous need for handling value to key
conversion in the setter, because the number had to be passed to `where`
directly. This is no longer required, since we can just pass the string
along to where. (It's left around for backwards compat)
Fixes #18387
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
It looks like the only reason `current_scope` was thread local on
`base_class` instead of `self` is to ensure that when we call a named
scope created with a proc on the parent class, it correctly uses the
default scope of the subclass. The reason this wasn't happening was
because the proc captured `self` as the parent class, and we're not
actually defining a real method. Using `instance_exec` fixes the
problem.
Fixes #18806
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Refactor `quote_default_expression`
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
`quote_default_expression` and `quote_default_value` are almost the same
handling for do not quote default function of `:uuid` columns. Rename
`quote_default_value` to `quote_default_expression`, and remove
duplicate code.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Fixes incorrect wording of test description
|