In some applications, some classes of errors may be raised during the
execution of a job which the developer would want to retry forever.
These classes of errors would most likely be infrastructure problems that
the developer knows will be resolved eventually but may take a variable
amount of time or errors where due to application business logic, there
could be something temporarily blocking the job from executing, like a
resource that is needed for the job being locked for a lengthy amount of
time.
While an arbitrarily large number of attempts could previously be passed,
this is inexpressive as sometimes the developer may just need the job to
continue to be retried until it eventually succeeds. Without this,
developers would need to include additional code to handle the situation
where the job eventually fails its attempts limit and has to be re-enqueued
manually.
As with many things this should be used with caution and only for errors
that the developer knows will definitely eventually be resolved, allowing
the job to continue.
[Daniel Morton + Rafael Mendonça França]
Because the PluginCommand is defined with `hide_command!`, running
`bin/rails -h` hides the plugin command.
As an alternative to removing the `hide_command!` this adds the plugin
command to the USAGE. Unless it's an engine, because adding an engine to
an engine doesn't make sense.
Both the railtie and engine terms are used so a user can search for both.
[Petrik de Heus + Rafael Mendonça França + Jonathan Hefner]
* Update resolve_link_as to include SVG
Preloading SVGs won't work without 'as: image' because of:
`Preload of /packs/media/images/81d035675e31079ea9da.svg was ignored due to unknown “as” or “type” values, or non-matching “media” attribute.`
Preloading SVGs can be useful, for instance when using sprites such as bootstrap-icons.
* Adds test case for asset_tag_helper
* Fix test case -- silly mistake
[xanderificnl + Rafael Mendonça França]
* Move to ESM and drop Babel transpiling
* Make the activestorage JS directly available through the asset pipeline as a precompiled asset
* Use example with direct attachment
* Explain that direct reference is possible
* Active Storage JS is a module
* Retain umd asset for backwards compatibility, add ESM file in addition
* Explain how to use activestorage.esm with importmap
* Use untranspiled activestorage inclusion
* Don't repeat terser options
The language in the docs is clearer without saying MySQL is stupid. The
test doesn't need stupid in the value to be used - an incorrect value is
incorrect.
The test for CurrentAttributes using thread-local variables leaks
an instance in Thread.current.
Usually instances are reset in the test helper but the objects remain:
activesupport/lib/active_support/current_attributes/test_helper.rb:11
In this situation we use clear_all to make sure we don't leave instances
behind when the configuration is changed.
* Action Text JS should be available via the asset pipeline too
* Main was a module anyway, no need to reference that twice
* Fix rollup references
* Precompile action text JS for asset pipeline
* No JavaScript dependencies needed with the asset pipeline
* Stub Webpacker::Engine to trigger webpack path for testing
* Extract asset paths
* Exercise asset pipeline path
* Terser doesn't do anything useful on this small package
* Make trix directly available to the asset pipeline
* Indirect doesn't carry its worth
* Reminder for development about keeping things in sync for the asset pipeline
* Ensure this isn't turned into undefined while mirroring
* Mirror Trix CSS for asset pipeline
* Add the needed JS include tag automatically under the asset pipeline
* Please RuboCop
* Keep the peer dependency
Even though we also need it explicitly as a dev dependency in order to generate the mirror output for trix.
* Fix test
* Add CHANGELOG entry
assert_not_equal is an alias for refute_equal that is defined only on
the class ActiveSupport::TestCase. This commit ensures
ActiveSupport::Testing::Assertions#assert_changes doesn't depends on
ActiveSupport::TestCase to work.
This commit intends to clarify the difference between
`Middleware#delete` and `Middleware#delete!`.
The former method silently fails when the target item is
not found, while the latter raises an error.
The functionality of `delete!` has been introduced in 688ed70
and given a name `remove`. This commit only renames it.
Also, a brief description of `delete!` method is now
provided for guides so that users can acknowledge the difference.
This comment was correct when it was added in 65843e1. In that commit, ActiveRecord::AssociationScope#scope applies the nearest association's scope, and #add_constraints skips it.
c8d8899 made the comment incorrect. It modified #scope not to apply the nearest association's scope and #add_constraints to apply scopes for the entire association chain.
Setting `remove_deprecated_time_with_zone_name` didn't work because
the value is checked in a framework initialiser, which runs before application initialiser.
This PR moves the setting inside the `config.after_initialize` block.
I've also added 2 tests for this behaviour.
Fixes#42820
This fixes the `current_page?` helper when the given URL has a trailing
slash, and is an absolute URL or also has query params.
Fixes#33956.
Co-authored-by: Rien Maertens <rien.maertens@posteo.be>