| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| | |
cpruitt/fix-actionview-notimplemented-with-path-set
Deprecate ActionView::PathSet as argument to ActionView::Base.new
|
|/
|
|
| |
Currently, `ActionView::Base.new` will raise a `NotImplementedError` when given an instance of `ActionView::PathSet` on initialization. This commit prevents the raised error in favor of a deprecation warning.
|
|\
| |
| | |
[ci skip] Updated the documentation for bulk delete in activerecord
|
|/ |
|
|\
| |
| | |
Replaced usage of where.delete/destroy_all with delete/destroy_by
|
| | |
|
|\ \
| | |
| | | |
Fix reset of the source association when through association is loaded
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The special case happens when through association has a custom scope
that is applied to the source association when loading.
In this case, the soucre association would need to be reset after
main association is loaded. See tests.
The special case exists when a through association has
|
| | | |
|
|\ \ \
| | | |
| | | |
| | | |
| | | | |
abhaynikam/add-query-method-delegation-test-for-destory-by-and-delete-by
Added delegation tests for delete_by and destroy_by methods
|
|/ / / |
|
|\ \ \
| | | |
| | | | |
Deprecate LookupContext#rendered_format
|
| | | |
| | | |
| | | |
| | | |
| | | | |
We no longer depend on `rendered_format` side effects, so we can remove
this method now. 🎉
|
|\ \ \ \
| |/ / /
|/| | | |
Let Zeitwerk integration unhook AS::Dependencies
|
| | | | |
|
|\ \ \ \
| |/ / /
|/| | | |
Return rendered template objects from renderers
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This commit introduces "rendered template" and "rendered collection"
objects. The template renderers can now return a more complex object
than just strings. This allows the framework to get more information
about the templates that were rendered. In this commit we use the
rendered template object to set the "rendered_format" on the lookup
context in the controller rather than all the way in the template renderer.
That means we don't need to check the "rendered_format" every time we
render a template, we just do it once after all templates have been
rendered.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This commit is to remove direct access to the "rendered_format"
attribute on the lookup context. "rendered_format" is an implementation
detail that we shouldn't test directly.
|
| | | | |
|
|/ / / |
|
|\ \ \
| | | |
| | | | |
Pass the template format to the digestor
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This commit passes the template format to the digestor in order to come
up with a key. Before this commit, the digestor would depend on the
side effect of the template renderer setting the rendered_format on the
lookup context. I would like to remove that mutation, so I've changed
this to pass the template format in to the digestor.
I've introduced a new instance variable that will be alive during a
template render. When the template is being rendered, it pushes the
current template on to a stack, setting `@current_template` to the
template currently being rendered. When the cache helper asks the
digestor for a key, it uses the format of the template currently on the
stack.
|
|\ \ \ \
| |_|_|/
|/| | | |
Reset column info after making Topic tz-aware
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
In AttributeMethodsTest, we make the global Topic class time zone-aware
which changes instance date time attribute casting behaviour. We need to
reset column info after the test because future tests don't expect Topic
date time columns to be time zone-aware.
|
|\ \ \ \
| | | | |
| | | | |
| | | | | |
Introduce delete_by and destroy_by methods to ActiveRecord::Relation
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This reverts commit 6b69ae5149f03c2f81a795c085bce56ec18535ae, reversing
changes made to 84bd9adafde36d0192849649b86ffcd4e59e5e11.
Reason: We already use "happen" a lots for callbacks and validations.
https://github.com/rails/rails/pull/35324#issuecomment-465096483
[ci skip]
|
|\ \ \ \ \
| |/ / / /
|/| | | | |
Update active_record_callbacks.md [ci skip]
|
|/ / / /
| | | |
| | | |
| | | | |
Change 'happen' to a more technical term
|
|\ \ \ \
| | | | |
| | | | | |
Don't allow `where` with invalid value matches to nil values
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
That is considered as silently leaking information.
If type casting doesn't return any actual value, it should not be
matched to any record.
Fixes #33624.
Closes #33946.
|
| | | | |
| | | | |
| | | | |
| | | | | |
(#35303)
|
| |/ / /
|/| | | |
|
|\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | | |
Actionpack typo fix
[ci skip]
|
| |/ / / |
|
|/ / /
| | |
| | |
| | | |
When reloading is disabled, after_initialize hooks run after to_prepare hooks have already run for the last time. Since to_prepare hooks always run after application initializers, we don't need need to use an after_initialize hook.
|
|\ \ \
| | | |
| | | |
| | | | |
Return correct date in ActiveModel for time to date conversions
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
time.to_date conversion happens considering leap years
so a conversion of "Day.new({'day(1i)'=>'1', 'day(2i)'=>'1', 'day(3i)'=>'1'})" results in saving the date as Mon, 03 Jan 0001
which might seem weird on the user level, hence falling back to parsing on string level resolves this data mismatch
Fixes #28521
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Since `serialize` is passed user input args (from `where`, schema
default, etc), a helper should provide `serialize` if the helper also
provide `cast`.
Related #32624, 34cc301, a741208.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
This is covered by `test_update_all_with_order_and_limit_updates_subset_only`
and `test_update_all_with_order_and_limit_and_offset_updates_subset_only`.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
`value_from_multiparameter_assignment` defined by
`AcceptsMultiparameterTime` helper requires `default_timezone` method
which is defined at `TimeValue` helper.
Since `Date` type doesn't include `TimeValue`, I've extracted `Timezone`
helper to be shared by `Date`, `DateTime`, and `Time` types.
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Before:
```
SELECT "comments".* FROM "comments" WHERE "comments"."type" IN ('VerySpecialComment') AND "comments"."post_id" = ? LIMIT ? [["post_id", 4], ["LIMIT", 1]]
```
After:
```
SELECT "comments".* FROM "comments" WHERE "comments"."type" = ? AND "comments"."post_id" = ? LIMIT ? [["type", "VerySpecialComment"], ["post_id", 4], ["LIMIT", 1]]
```
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This fixes a bug that the `foreign_key` and the `foreign_type` are
separated as different table conditions if a polymorphic association has
a scope that joins another tables.
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
Auto correct rubocop offenses
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Offenses:
railties/lib/rails/autoloaders.rb:1:1: C: [Corrected] Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true.
module Rails
^
actionmailer/test/base_test.rb:917:1: C: [Corrected] Layout/EmptyLinesAroundBlockBody: Extra empty line detected at block body beginning.
actionmailer/test/base_test.rb:917:1: C: [Corrected] Layout/TrailingWhitespace: Trailing whitespace detected.
actionmailer/test/base_test.rb:917:5: C: [Corrected] Style/RedundantBegin: Redundant begin block detected.
begin
^^^^^
actionmailer/test/base_test.rb:918:3: C: [Corrected] Layout/IndentationWidth: Use 2 (not 4) spaces for indentation.
events = []
^^^^
actionmailer/test/base_test.rb:930:1: C: [Corrected] Layout/EmptyLinesAroundBlockBody: Extra empty line detected at block body end.
actionmailer/test/base_test.rb:930:1: C: [Corrected] Layout/TrailingWhitespace: Trailing whitespace detected.
|