| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
maintaining behavior errors.details[:foo].any?
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Fix double wrapping issue
Revert messages_for wrapping. It's a new method so no need to put
deprecation warnings.
|
|
|
|
| |
Revert some tests to ensure back compatibility
|
| |
|
|
|
|
| |
To keep the same as SHA dcafe995bfe51e53dd04607956be9b54073e9cb6
|
| |
|
|
|
|
|
| |
autosave duplicate errors can be removed
See SHA 7550f0a016ee6647aaa76c0c0ae30bebc3867288
|
| |
|
|
|
|
| |
This is because we try to accommodate old hash behavior, so `first` and `last` now does not return Error object.
|
|
|
|
|
| |
All enumerable methods must go through the `each` so it retain old hash behavior.
Revert this after Rails 6.1 in order to speed up enumerable methods.
|
| |
|
| |
|
|
|
|
|
|
| |
Many operations need grouping of errors by attributes, e.g. ActiveRecord::AutosaveAssociation#association_valid?
Refactor other methods using group_by_attribute
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allow `each` to behave in new way if block arity is 1
Ensure dumped marshal from Rails 5 can be loaded
Make errors compatible with marshal and YAML dumps from previous versions of Rails
Add deprecation warnings
Ensure each behave like the past, sorted by attribute
|
|
|
|
|
|
|
| |
Add initialize_dup to deep dup.
Move proc eval and flexible message position out to Errors,
because proc eval is needed for Errors#added? and Errors#delete
|
| |
|
|
|
|
|
|
| |
* Allow plugins to access the global service and alternative service configs before ActiveStorage::Blob loads.
* Make ActiveStorage.service_configurations the default second argument to ActiveStorage::Service.configure. Plugins that just want to use an alternative service defined in config/storage.yml needn't pass in the config themselves.
|
|
|
|
|
|
| |
* use backticks instead of `+`
* and more (e.g. missed replacing `Array#excluding` and
`Enumerable#excluding` in b89a3e7e638a50c648a17d09c48b49b707e1d90d)
|
|\
| |
| |
| | |
Fix callbacks on has_many :through associations
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When adding a child record via a has_many :through association,
build_through_record would previously build the join record, and then
assign the child record and source_type option to it. Because the
before_add and after_add callbacks are called as part of build, however,
this caused the callbacks to receive incomplete records, specifically
without the other end of the has_many :through association. Collecting
all attributes before building the join record ensures the callbacks
receive the fully constructed record.
|
| |
| |
| |
| |
| |
| |
| | |
* add leading `#` before `=>` since hash rocket is valid Ruby code
* add backticks
* remove trailing spaces
* and more
|
|\ \
| | |
| | | |
RFC: Introduce Template::File
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The previous behaviour of render file: was essentially the same as
render template:, except that templates can be specified as an absolute
path on the filesystem.
This makes sense for historic reasons, but now render file: is almost
exclusively used to render raw files (not .erb) like public/404.html. In
addition to complicating the code in template/resolver.rb, I think the
current behaviour is surprising to developers.
This commit deprecates the existing "lookup a template from anywhere"
behaviour and replaces it with "render this file exactly as it is on
disk". Handlers will no longer be used (it will render the same as if
the :raw handler was used), but formats (.html, .xml, etc) will still be
detected (and will default to :plain).
The existing render file: behaviour was the path through which Rails
apps were vulnerable in the recent CVE-2019-5418. Although the
vulnerability has been patched in a fully backwards-compatible way, I
think it's a strong hint that we should drop the existing
previously-vulnerable behaviour if it isn't a benefit to developers.
|
| | | |
|
| | | |
|
|\ \ \
| | | |
| | | | |
[ci skip] Fix typo directores -> directories
|
|/ / / |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
During initialization, the eager load paths of engines are unshifted
into AS::Dependencies.autoload_paths. After that, the collection is
frozen. (See the initializers in railties/lib/rails/engine.rb.)
Hence, there is no eager load path that is not an autoload path too, and
so the array difference in the deleted code is always an empty array.
Just do nothing.
|
| | | |
|
|\ \ \
| | | |
| | | |
| | | |
| | | | |
abhaynikam/35752-update-migration-doc-column-identifier
[ci skip] Updated docs to reflect index: true option not available as column modifier
|
| | |/
| |/|
| | |
| | | |
modifier
|
|\ \ \
| |/ /
|/| |
| | |
| | | |
abhaynikam/35784-add-extract-associated-method-to-querying-doc
[ci skip] Add ActiveRecord::Relation#extract_associated method to the active_record_querying.md
|
|/ /
| |
| |
| | |
active_record_querying.md
|
| |
| |
| |
| |
| | |
record (#35784)
* Add `ActiveRecord::Relation#extract_associated` for extracting associated records from a relation
|
|\ \
| | |
| | | |
Type cast falsy boolean symbols on boolean attribute as false
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Before 34cc301, type casting by boolean attribute when querying is a
no-op, so finding by truthy boolean string (i.e.
`where(value: "true") # => value = 'true'`) didn't work as expected
(matches it to FALSE in MySQL #32624). By type casting is ensured, a
value on boolean attribute is always serialized to TRUE or FALSE.
In PostgreSQL, `where(value: :false) # => value = 'false'` was a valid
SQL, so 34cc301 is a regresson for PostgreSQL since all symbol values
are serialized as TRUE.
I'd say using `:false` is mostly a developer's mistake (user's input
basically comes as a string), but `:false` on boolean attribute is
serialized as TRUE is not a desirable behavior for anybody.
This allows falsy boolean symbols as false, i.e.
`klass.create(value: :false).value? # => false` and
`where(value: :false) # => value = FALSE`.
Fixes #35676.
|
|\ \ \
| | | |
| | | |
| | | |
| | | | |
abhaynikam/35789-follow-up-to-update-test-description-for-i18n-customize-full-message
Updated the test description for i18n-customize-full-message after rename in #35789
|
|/ / /
| | |
| | |
| | | |
#35789
|
|\ \ \
| | | |
| | | | |
Add rich_text field to model generators
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
Rename `i18n_full_message` config option to `i18n_customize_full_message`
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
- I feel `i18n_customize_full_messages` explains the meaning of the
config better.
- Followup of https://github.com/rails/rails/pull/32956
|
|/ / / / |
|
|\ \ \ \
| |_|/ /
|/| | | |
Fix annotated typo
|