| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
fix a typo in 5_2_release_notes.md
|
|/
|
| |
[ci skip]
|
|\
| |
| | |
Define the `url_options` needed for SytemTest inside the route proxy:
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- I made a change in https://github.com/rails/rails/pull/36691 to
delegate route helper to a proxy class.
This didn't take into account that the `url_options` we redefine
in SystemTest would be ignored.
This PR fixes that by definin the url_options inside the proxy
|
|\ \
| | |
| | | |
Fixed db:prepare task to not touch schema when it is disabled
|
| |/
| |
| |
| | |
is false.
|
|\ \
| | |
| | |
| | |
| | | |
abhaynikam/36738-followup-to-fix-typo-in-deprecation-message
Fixed the typo in the deprecation error messages. `Erors` -> `Errors`
|
| | | |
|
|/ /
| |
| |
| |
| | |
* Fix unintentionally linked String, Symbol, Hash, and ERB.
* Fix unintentionally code block.
|
|\ \
| | |
| | | |
Add support for Proc based parameter filtering on arrays of values
|
| | |
| | |
| | |
| | |
| | | |
Remove extra newline.
Co-Authored-By: Rafael França <rafael@franca.dev>
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
Based on the way parameters are currently processed, a parameter value of type Hash is recursively processed. For a value of type Array however, the current behavior is to simply return the original array, with no filtering. It is not clear what the expected behavior should be. But, doing nothing seems incorrect, since it bypasses custom Proc based parameter filtering all together for arrays of values. This change processes values of type Array consistently. We map over the values and recursively call value_for_key on them. This still works with values of type Hash, since value_for_key already knows how to process Hash values.
|
| | |
| | |
| | |
| | | |
Based on the way parameters are currently processed, a parameter value of type Hash is recursively processed. For a value of type Array however, the current behavior is to simply return the original array, with no filtering. It is not clear what the expected behavior should be. But, doing nothing seems incorrect, since it bypasses custom Proc based parameter filtering all together for arrays of values. This change introduces a failing test in preparation to add logic that proposes one possible option for the expected behavior with Array values.
|
|\ \ \
| | | |
| | | | |
Modify behaviour of `AM::Errors#to_h`:
|
| | |/
| |/|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
- `AM::Error#to_h` was kind of broken before and would return in the
hash values a single error message.
```ruby
person = Person.new
person.errors.add(:name, "cannot be blank")
person.errors.add(:name, "too long")
puts person.errors.to_h # {name: 'too long'}
```
Since an attribute can have different errors, the previous behavior
didn't make much sense.
Now, `ActiveModel::Errors#to_hash` correctly returns an array of
error messages containing all the errors for an attribute.
However, one can easily be surprised by this change, so let's
deprecated it first.
|
|\ \ \
| | | |
| | | |
| | | | |
Make currency symbols optional for money column type in PostgreSQL
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
Add pidfile option to puma config template
|
| | | | |
| | | | |
| | | | |
| | | | | |
This allow to call `pumactl` directly without extra parameters needed
|
|\ \ \ \ \
| |_|_|/ /
|/| | | | |
Fix host for ActiveStorage DiskService
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Previous behavior would only set host, which didn't work correctly
if the default_url_options contained the protocol or the port.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Fix cache_timestamp_format default value in guides
|
| | | | | | |
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Deprecate `AM::Errors#to_h`:
|
| |/ / / / /
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
- In ef4d3215b1198c456780b8d18aa62be7795b9b8c I made a change to
pass `AM::Error` object in case the arity of the block passed to
`each` accepted less than 2 arguments.
This is causing one issue for `to_h` as it expects the argument
passed to the block to be an Array (and were are passing it an
instance of `AM::Error`).
There is no real reason to use `to_h` anymore since `to_hash` exists
Deprecating `to_h` inf favor of `to_hash`
Co-Authored-By: Rafael França <rafael@franca.dev>
|
| | | | | | |
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Make Active Storage routes optional
|
|/ / / / / /
| | | | | |
| | | | | |
| | | | | | |
Add configuration option to turn off drawing of Active Storage routes.
|
| | | | | | |
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Edouard-chin/ec-source-annotation-extractor-deprecation
Move the deprecation call after the new class has been defined:
|
| |/ / / / /
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
- If we create the deprecation before the new class is defined this
creates an issue in case you use a `TracePoint`. The
`Tracepoint#return_value` will try to get the new class constant
resulting in a uninitialized constant Rails::SourceAnnotationExtractor
The problem can be reproduced like this:
```ruby
@defined = Set.new
ANONYMOUS_CLASS_DEFINITION_TRACEPOINT = TracePoint.new(:c_return) do |tp|
next unless @defined.add?(tp.return_value)
end
ANONYMOUS_CLASS_DEFINITION_TRACEPOINT.enable
require 'rails'
require "rails/source_annotation_extractor"
```
|
|\ \ \ \ \ \
| |/ / / / /
|/| | | | |
| | | | | |
| | | | | | |
alipman88/exclude_marshal_dump_from_delegate_missing_to
Exclude marshal_dump & _dump methods from being delegated via delegate_missing_to extension, fix #36522
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Exclude missing marshal_dump and _dump methods from being delegated to
an object's delegation target via the delegate_missing_to extension.
This avoids unintentionally adding instance variables to an object
during marshallization, should the delegation target be a method which
would otherwise add them.
In current versions of Ruby, a bug exists in the way objects are
marshalled, allowing for instance variables to be added or removed
during marshallization (see https://bugs.ruby-lang.org/issues/15968).
This results in a corrupted serialized byte stream, causing an object's
instance variables to "leak" into subsequent serialized objects during
demarshallization.
In Rails, this behavior may be triggered when marshalling an object that
uses the delegate_missing_to extension, if the delegation target is a
method which adds or removes instance variables to an object being
marshalled - when calling Marshal.dump(object), Ruby's built in behavior
will check whether the object responds to :marshal_dump or :_dump, which
in turn triggers the delegation target method in the
responds_to_missing? function defined in
activesupport/lib/active_support/core_ext/module/delegation.rb
While future versions of Ruby will resolve this bug by raising a
RuntimeError, the underlying cause of this error may not be readily
apparent when encountered by Rails developers. By excluding marshal_dump
and _dump from being delegated to an object's target, this commit
eliminates a potential cause of unexpected behavior and/or
RuntimeErrors.
Fixes #36522
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
masakazutakewaka/fix_create_newline_between_blocks
FIX: create a newline before group, github and source
|
|/ / / / / /
| | | | | |
| | | | | |
| | | | | | |
called.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Fix deprecation on `AM::Errors` when each is called indirectly
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
- `AM::Errors#each` is implemented for the `Enumerator` module and
get called indirectly by a bunch of method in the ruby land
(map, first, select ...)
These methods have a `-1` arity as they are written in C and they
wrongly trigger a deprecation warning.
This commit fixes that and correctectly return a `AM::Error` object
when `each` is called with a negative arity.
|
|\ \ \ \ \ \ \
| |/ / / / / /
|/| | | | | |
| | | | | | |
| | | | | | | |
masakazutakewaka/fix_railtie_add_newline_to_gemfile_insertion
Add a newline at the end of a Gemfile when it doesn't end with a newline
|
| | | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Assigning to a collection of attachments appends rather than replacing, as in 5.2. Existing 5.2 apps that rely on this behavior will no longer break when they're upgraded to 6.0.
For apps generated on 6.0 or newer, assigning replaces the existing attachments in the collection. #attach should be used to add new attachments to the collection without removing existing ones.
I expect that we'll deprecate the old behavior in 6.1.
Closes #36374.
|
| | | | | | | |
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Helper method to create an sms link
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
phone/desktop's messaging client with the phone number and optional body value prepopulated.
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
Fix a minor typo in ActionView::UnboundTemplate
|
| | | | | | | | | |
|
|\ \ \ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | | |
[ActiveRecord] Deduplicate optimizer hints
|
| | | | | | | | | | |
|