| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | | | |
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
Fix extension method with dirty target in has_many associations
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Extension methods should not delegate to `scope` to respect dirty
target on `CollectionProxy`.
Fixes #28419.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Remove duplicated `columns` definition
|
| |/ / / / |
|
| | | | | |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Add `app:update` task to engines
|
| |/ / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Occasionally we update the file generated by engine.
Therefore, I think that there is a task for updating as well as
application in the engine, it is convenient for updating.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Delegate `uniq` to `records`
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Since b644964b `ActiveRecord::Relation` includes `Enumerable` so
delegating `collect`, `all?`, and `include?` are also unneeded.
`collect` without block returns `Enumerable` without preloading by that.
We should use `load` rather than `collect` for force loading.
|
|\ \ \ \ \ \
| |_|/ / / /
|/| | | | | |
Fix `select_all` with legacy `binds`
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Fixes #27923.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Fix `warning: character class has duplicated range`
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
This fixes the following warnings:
```
railties/test/generators/encrypted_secrets_generator_test.rb:15: warning: character class has duplicated range: /[\w\d]+/
railties/test/generators/encrypted_secrets_generator_test.rb:18: warning: character class has duplicated range: /production:\n# external_api_key: [\w\d]+/
railties/test/generators/encrypted_secrets_generator_test.rb:19: warning: character class has duplicated range: /production:\n# external_api_key: [\w\d]+/
```
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Evaluate the default block only when necessary
|
| | |_|/ / / /
| |/| | | | |
| | | | | | |
| | | | | | | |
Follow up of #28453.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
This fixes CI failure due to 48f3be8c.
`Enumerable#uniq` was introduced since Ruby 2.4. We should delegate
`uniq` to `records` explicitly.
And since b644964b `ActiveRecord::Relation` includes `Enumerable` so
delegating `map` is unneeded.
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
y-yagi/fix_changelog_entry_about_transaction_error_classes
Fix changelog entry about transaction error classes [ci skip]
|
| | |/ / / / /
| |/| | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
`ActiveRecord::TransactionSerializationError` was introduces in #25093.
However, refactored in #25107, `TransactionSerializationError` is gone.
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Correctly check whether key is defined in configuration
|
| |/ / / / / /
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
It can not check correctly with `defined?`
```ruby
irb(main):001:0> Rails.application.config.active_record
=> {:maintain_test_schema=>true, :belongs_to_required_by_default=>true}
irb(main):002:0> defined?(Rails.application.config.active_record)
=> nil
```
Follow up to #28469
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Remove stray back-end from ActiveJob Basics guide
|
| |/ / / / / /
| | | | | | |
| | | | | | | |
The hyphenated form "back-end" only appears once in this guide; elsewhere, the un-hyphenated form "backend" is used consistently.
|
|\ \ \ \ \ \ \
| |/ / / / / /
|/| | | | | | |
Minor grammar fixes for Rails 5.1 release notes
|
|/ / / / / / |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
[ci skip]
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
[ci skip]
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
[ci skip]
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
[ci skip]
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Fixing tons of grammar, etc.
[ci skip]
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Move new CHANGELOG entry to the top [ci skip]
|
| | |_|_|/ /
| |/| | | | |
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Improve Caching with Rails Guides [ci skip]
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Adds the "Caching in Development" section to
demonstrate usage of the dev:cache task in development mode.
Also, makes a small grammatical correction in section 2.4.
|
|\ \ \ \ \ \ \
| |_|_|/ / / /
|/| | | | | | |
Track the version-compatible config settings inside railties
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Instead of forcing new applications to carry an initializer that just
switches things to what their default "should" be, we can handle it
internally.
The initializer is then only used by upgraders: it shows what the new
default would be (commented out), while their upgraded application
continues to operate as it did before.
Under this model, a multiply-upgraded application could accumulate
several new_framework_defaults_*.rb files, for each release series it
has traversed. A given release series only needs to generate the latest,
though, because we don't support `rails app:upgrade` while skipping
releases.
|
| |/ / / / /
|/| | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Action View overrides `url_for` in the view context to render paths by
default when using `url_for` and this means that direct route helpers
don't get the full url when called with the url suffix. To fix this
always call the original `url_for`.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Allow order to be given expressions as hash keys
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
When `order` is given a hash, the keys are currently assumed to be
attribute names and are quoted as such in the query, which makes it
impossible to pass an expression instead:
Post.order("LENGTH(title)" => :asc).last
# SELECT `posts`.* FROM `posts` ORDER BY `posts`.`LENGTH(title)` DESC LIMIT 1
If the key is an `Arel::Nodes::SqlLiteral`, we now use it directly in
the query. This provides a way to build a relation with a complex order
clause that can still be reversed with `reverse_order` or `last`.
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Drop comments from structure.sql in postgresql
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Fixes #28153.
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
[ci skip]
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
Add first draft of release notes for Rails 5.1 :tada:
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
[ci skip]
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
This was causing an infinity loop since it was delegating to `all` and
all delegating back to this module.
|
| |_|_|/ / / / /
|/| | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Not all requirements can be expressed in terms of polymorphic url
options so add a `route_for` method that allows calling another
direct route (or regular named route) which a set of arguments, e.g:
resources :buckets
direct :recordable do |recording|
route_for(:bucket, recording.bucket)
end
direct :threadable do |threadable|
route_for(:recordable, threadable.parent)
end
This maintains the context of the original caller, e.g.
threadable_path(threadable) # => /buckets/1
threadable_url(threadable) # => http://example.com/buckets/1
|