| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | |/ / / /
| |/| | | | |
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Add ActiveModel::Errors#merge!
|
| | |/ / / /
| |/| | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
ActiveModel::Errors#merge! allows ActiveModel::Errors to append errors from
a separate ActiveModel::Errors instance onto their own.
Example:
person = Person.new
person.errors.add(:name, :blank)
errors = ActiveModel::Errors.new(Person.new)
errors.add(:name, :invalid)
person.errors.merge!(errors)
puts person.errors.messages
# => { name: ["can't be blank", "is invalid"] }
|
|/ / / / / |
|
|\ \ \ \ \
| |/ / / /
|/| | | | |
Fix extracting MariaDB version
|
|/ / / /
| | | |
| | | |
| | | |
| | | |
| | | | |
Currently `version` method always returns `5.5.5` because the
`full_version` is `5.5.5-10.x.y-MariaDB...` since MariaDB 10.x.
It should be ignored if the prefix is `5.5.5-`.
|
|\ \ \ \
| | | | |
| | | | | |
Allow mounting same engine under several locations
|
| | | | | |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Fix `ActiveModel::Type::DateTime#serialize`
|
| |/ / / /
| | | | |
| | | | |
| | | | |
| | | | | |
`ActiveModel::Type::DateTime#serialize` should return a `Time` object
so that finding by a datetime column works correctly.
|
|\ \ \ \ \
| |/ / / /
|/| | | | |
Mention Time.zone.parse possibly throwing ArgumentError
|
| | | | | |
|
|\ \ \ \ \
| | | | | |
| | | | | |
| | | | | | |
Fix Parameters configuration integration tests
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
These tests relied on `ActionController::Parameters` being configured as
part of the boot process; since that now happens lazily we need to force
`ActionController::Base` to load so that we can test the behaviour.
The new tests added here ensure that `ActionController::Parameters` can
be configured from an initializer, which was broken until recently.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Now that the parameters configurations are only loaded when
ActionController::Base is we need to foce them to load in our tests. In
an application this is not needed since every request already load the
controllers.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Fix warning: `*' interpreted as argument prefix
|
|/ / / / / /
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
```
/Users/kamipo/src/github.com/rails/rails/activesupport/test/core_ext/module_test.rb:402: warning: `*' interpreted as argument prefix
/Users/kamipo/src/github.com/rails/rails/activesupport/test/core_ext/module_test.rb:420: warning: `*' interpreted as argument prefix
```
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | |
| | | | | | | |
Return prefixed method names from `Module.delegate`, if using prefixes
|
|/ / / / / /
| | | | | |
| | | | | |
| | | | | | |
if using prefix version.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Fix association with scope including joins
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Fixes #28324.
|
| | | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
These are no longer used since b98668decb9712f26118de57623fd15d7d28646d.
|
|\ \ \ \ \ \ \
| |_|/ / / / /
|/| | | | | | |
Add missing `attr_name.to_s` in `AttributeMutationTracker`
|
| |/ / / / /
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
`attributes` (`values` in `LazyAttributeHash` in `AttributeSet`) has
string keys, not symbols.
Fixes #29665.
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
We need to configure it only when ActionController::Base is loaded
otherwise configs on initializers will not work.
Closes #29527.
|
| | | | | | |
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
kamipo/fix_test_copying_migrations_preserving_magic_comments
Fix `test_copying_migrations_preserving_magic_comments`
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Since #29540, `# frozen_string_literal: true` included original
migration files.
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Allow the use of Bundler 2.0
|
| | |_|_|_|/ /
| |/| | | | | |
|
|\ \ \ \ \ \ \
| |/ / / / / /
|/| | | | | | |
Deprecate database specific JSON types
|
| | |/ / / /
| |/| | | |
| | | | | |
| | | | | | |
We already have database agnostic `Type::Json` since #29220.
|
|\ \ \ \ \ \
| |/ / / / /
|/| | | | | |
Add missing http status codes [ci skip]
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Ref: https://github.com/rack/rack/commit/5401f776f660b1f8d0e0650ba78478d7488eff75,
https://github.com/rack/rack/commit/73e08279d4433ca66cf22157a40dba562629031a
|
| | | | | | |
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Using require_relative in the Rails codebase
|
| |\ \ \ \ \ \
| |/ / / / / /
|/| | | | | | |
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Remove redundant `assert_respond_to`
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
It is covered by following assertion.
|
| | | | | | | | |
|
|/ / / / / / / |
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Don't wrap parameters if query parameter exists
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
We want to avoid overwriting a query parameter with the wrapped
parameters hash. Previously this was implemented by merging the wrapped
parameters at the root level if the key already existed, which was
effectively a no-op. The query parameter was still overwritten in the
filtered parameters hash, however.
We can fix that discrepancy with a simpler implementation and less
unnecessary work by skipping parameter wrapping entirely if the key was
sent as a query parameter.
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
Fix removed version 5.2 to 6.0 in the deprecation message
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Because the deprecation message is not yet released.
|
|\ \ \ \ \ \ \ \ \
| |/ / / / / / / /
|/| | | | | | | | |
Move test related to `tmp:clear` task to `tmp_test.rb`
|
|/ / / / / / / / |
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Let's say you have a nested transaction and both records are saved.
Before the outer transaction closes, a rollback is performed. Previously
the record in the outer transaction would get marked as not persisted
but the inner transaction would get persisted.
```ruby
Post.transaction do
post_one.save # will get rolled back
Post.transaction(requires_new: true) do
post_two.save # incorrectly remains marked as persisted
end
raise ActiveRecord::Rollback
end
```
To fix this the PR changes transaction handling to have the child
transaction ask the parent how the records should be marked. When
there are child transactions, it will always be a SavpointTransaction
because the stack isn't empty. From there we pass the parent_transaction
to the child SavepointTransaction where we add the children to the parent
so the parent can mark the inner transaction as rolledback and thus mark
the record as not persisted.
`update_attributes_from_transaction_state` uses the `completed?` check to
correctly mark all the transactions as rolledback and the inner record as
not persisted.
```ruby
Post.transaction do
post_one.save # will get rolled back
Post.transaction(requires_new: true) do
post_two.save # with new behavior, correctly marked as not persisted
on rollback
end
raise ActiveRecord::Rollback
end
```
Fixes #29320
|