| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| | |
rails/revert-23017-schneems/migration-sets-environment-value
Revert "Set environment even when no migration runs"
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
glittershark/if-and-unless-in-secure-token"
This reverts commit 224eddfc0eeff6555ae88691306e61c7a9e8b758, reversing
changes made to 9d681fc74c6251d5f2b93fa9576c9b2113116680.
When merging the pull request, I misunderstood `has_secure_token` as declaring a model
has a token from birth and through the rest of its lifetime.
Therefore, supporting conditional creation doesn't make sense. You should never mark a
model as having a secure token if there's a time when it shouldn't have it on creation.
|
|\
| |
| | |
`substitute_at` is no longer used
|
| |
| |
| |
| | |
Arel handles substitution for bind parameters by now.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The code that set the from clause was removed in
bdc5141652770fd227455681cde1f9899f55b0b9. I did not give any reason for
doing so. My assumption was that I intended to change it to use the
clause objects, but forgot. We appeared to not have test coverage for
this case.
Fixes #22996
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The code was changed to call `where` on a specific class in 813c8c07,
but no reasoning was given and I can't see any good reason why we would
need to do that. This will ensure that the method is called on whatever
class the scope is called on.
Fixes #23013
|
|\ \
| | |
| | |
| | |
| | | |
schneems/schneems/migration-sets-environment-value
Set environment even when no migration runs
|
| | |
| | |
| | |
| | |
| | | |
This PR addresses the issue described in https://github.com/rails/rails/pull/22967#issuecomment-170251635. If the database is non empty and has no new migrations than `db:migrate` will not set the environment. This PR works by always setting the environment value on successful `up` migration regardless of whether or not a migration was actually executed.
|
| | | |
|
|\ \ \
| | | |
| | | | |
update doc for << method of has_many association
|
| | | | |
|
|\ \ \ \
| |/ / /
|/| | | |
[ci skip] fix typo in docs
|
|/ / / |
|
|\ \ \
| | | |
| | | | |
Fix typo in docs [ci skip]
|
|/ / / |
|
| |/
|/|
| |
| |
| | |
Converting nbsp(\u{00A0}) to the normal ASCII space(\u{0020})
[ci skip]
|
| | |
|
| |
| |
| |
| | |
Closes #22584.
|
|\ \
| | |
| | | |
Improve error message for #or when it is structurally incompatible
|
|/ /
| |
| |
| |
| |
| |
| |
| | |
When you are using scopes and you chaining these scopes it is hard to
know which are the values that are incompatible. This way you can read
the message and know for which values you need to look for.
[Herminio Torres]
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This reverts commit 5d41cb3bfd6b19833261622ce5d339b1e580bd8b.
This implementation does not properly handle cases involving predicates
which are not associated with a bind param. I have the fix in mind, but
don't have time to implement just yet. It will be more similar to #22823
than not.
|
| |
| |
| |
| |
| | |
Empty strings / data structures should be treated differently than nils.
We don't really need these calls here (don't pass in blank strings).
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Instead of checking whether the class has recycle! or not, we can just
always add the method to all controller classes when the test harness is
loaded. Technically this means that the controller test harness will
not work with controllers that do not inherit from AC::Metal, but then,
I'm not sure that is supported anyway.
Mixing in the module one will ensure that we don't break method caches,
and eliminates a runtime check so it should speed up tests (slightly).
|
|\ \
| | |
| | | |
Add HTTP status name to output of tests
|
| | |
| | |
| | |
| | |
| | | |
Also, refactor logic to convert between symbol and response code,
via the AssertionResponse class
|
|\ \ \
| | | |
| | | | |
Prevent static middleware from attempting to serve a request with a null byte
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
File paths cannot contain null byte characters and methods that do path
operations such as Rack::Utils#clean_path_info will raise unwanted
errors.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
While the predicates are an arel equality node where the left side is a
full arel attribute, the binds just have the name of the column and
nothing else. This means that while splitting the predicates can include
the table as a factor, the binds cannot. It's entirely possible that we
might be able to have the bind params carry a bit more information (I
don't believe the name is used for anything but logging), and that is
probably a worthwhile change to make in the future.
However the simplest (and likely slightly faster) solution is to simply
use the indices of the conflicts in both cases. This means that we only
have to compute the collision space once, instead of twice even though
we're doing an additional array iteration. Regardless, this method isn't
a performance hotspot.
Close #22823.
[Ben Woosley & Sean Griffin]
|
|\ \ \ \
| |_|/ /
|/| | | |
AC::Parameters#at_json: restore Rails 4.2’s value
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Fixes #23026
See discussion at #23026
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | | |
Closes #23027.
This does not restore complete backwards compatibility. It simply passes
the contets of the `TEST` env to the new runner.
|
| | |
| | |
| | |
| | | |
Closes #23021.
|
|\ \ \
| | | |
| | | | |
Make default scopes + STI happy again
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Given a default_scope on a parent of the current class, where that
parent is not the base class, the parent's STI condition would become
attached to the evaluated default scope, and then override the child's
own STI condition.
Instead, we can treat the STI condition as though it is a default scope,
and skip it in this situation: the scope will be merged into the base
relation, which already contains the correct STI condition.
Fixes #22426.
|
| | |/
| |/|
| | |
| | |
| | |
| | |
| | | |
While the commit message (and changelog example) in
5e0b555b453ea2ca36986c111512627d806101e7 talked about sibling classes,
the added test had a child ignore its parent's scoping, which seems less
reasonable.
|
|\ \ \
| | | |
| | | | |
Commit before freezing the headers
|
|/ / /
| | |
| | |
| | |
| | | |
This shouldn't generally come up: under a standard flow, we don't start
sending until after the commit. But application code always finds a way.
|
|\ \ \
| | | |
| | | | |
Add a note on ActionController guide about 404
|
| | | |
| | | |
| | | |
| | | | |
[ci skip]
|
|/ / / |
|
|\ \ \
| |/ /
|/| | |
Allow manually setting environment value
|
|/ /
| |
| |
| |
| |
| |
| |
| | |
If for some reason some one is not able to set the environment from a migration this gives us an escape valve to manually set the environment for the database see https://github.com/rails/rails/pull/22967#issuecomment-170251635.
We will also fix the migration case, but this will ensure there is always a way to set the environment.
cc/ @sgrif
|
|\ \
| | |
| | | |
remove warnings from rake test
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This removes the following warnings.
```
test/application/rake_test.rb:33: warning: ambiguous first argument; put parentheses or a space even after `/' operator
test/application/rake_test.rb:43: warning: ambiguous first argument; put parentheses or a space even after `/' operator
```
|
|\ \ \
| |/ /
|/| | |
delete only unnecessary reporter
|
| | |
| | |
| | |
| | |
| | | |
Reporter that defines its own users at the time of this process are also loaded,
to avoid them from being deleted, to delete only the specified to unnecessary reporter.
|
|\ \ \
| | | |
| | | | |
Extract `MySQL::{Column|TypeMetadata}` classes to the appropriate files
|
| | | |
| | | |
| | | |
| | | | |
`connection_adapters/mysql/type_metadata.rb`
|