Commit Graph

83256 Commits

Author SHA1 Message Date
Lewis Buckley
b04fa783b7
[skip ci] Document Action Mailbox instrumentation
Follows 246c13f8df833cd8d8ae423af253bf06ceca0fc0
2022-03-14 20:35:08 +00:00
Rafael Mendonça França
b9e8642279
Merge pull request #44655 from lewispb/action-mailbox-instrumentation
Change the Action Mailbox AS::Notification payload to include the mailbox instance
2022-03-14 15:52:39 -04:00
Aaron Patterson
98b2e8a496
Merge pull request #43688 from jonathanhefner/has_secure_password-password_challenge
Support password challenge via `has_secure_password`
2022-03-14 09:47:16 -07:00
Aaron Patterson
d28efa55fa
Merge pull request #43975 from codergeek121/bugfix-for-time-select-prompt
Fix a bug with time_select and prompts
2022-03-14 09:44:42 -07:00
Aaron Patterson
5fc49a6c7c
Merge pull request #43958 from jonathanhefner/authenticate_by-short-circuit-empty-password
Short circuit `authenticate_by` on empty password
2022-03-14 09:42:30 -07:00
Aaron Patterson
9daee41369
Merge pull request #44670 from pixeltrix/fix-generator-route-url-for-namespaced-controllers
Use `controller_class_path` in `Rails::Generators::NamedBase#route_url`
2022-03-14 09:40:51 -07:00
Vipul A M
0ee85c7992
Merge pull request #44683 from ghousemohamed/fix-typo-github 2022-03-14 08:18:11 -04:00
Ghouse Mohamed
60419870b1 Fixed typo: Github -> GitHub 2022-03-14 17:29:10 +05:30
Jean Boussier
c48d846518
Merge pull request #44085 from MatheusRich/accept-active-storage-objects-on-audio-and-video-tags
Extend audio_tag and video_tag to accept Active Storage attachments
2022-03-14 08:46:54 +01:00
Matheus Richard
414394206a Extend audio_tag and video_tag to accept Active Storage attachments.
Now it's possible to write

    audio_tag(user.audio_file)
    video_tag(user.video_file)

Instead of

    audio_tag(polymorphic_path(user.audio_file))
    video_tag(polymorphic_path(user.video_file))

image_tag already supported that, so this follows the same pattern.
2022-03-14 02:05:37 -03:00
Vipul A M
6bc36349e8
Merge pull request #44680 from JesseSousa/patch-2 2022-03-13 20:11:13 -04:00
Jesse Sousa
27a2129929
Fix typo 2022-03-13 21:07:06 -03:00
Jean Boussier
a1c6fc313b
Merge pull request #44654 from kaspernj/maria-db-default-function
Fixed MariaDB default function
2022-03-13 19:42:56 +01:00
Jonathan Hefner
5de5583f8b
Merge pull request #44678 from ghousemohamed/improvements-to-timezone-rdoc-activesupport
More rdoc improvements to activesupport [ci-skip]
2022-03-13 13:02:25 -05:00
kaspernj
4ccd79cdd6 Fixed MariaDB default function
Dont test default function on MySQL where it is unsupported and default expect default function instead of default value

Simplified test - dont repeat last test

Removed cache of create table SQL - it messes up when tables change, and it should only be called when a default is set and the other cases arent true anyway

Test if string first (starts with single quote) because default_type does a SQL lookup and is more expensive

Fixed tests: Postgres uses a different named method for generating UUID's

Skip check if column default is a function when it starts with a number to reduce the number of queries done

Added note in CHANGELOG.md
2022-03-13 17:58:42 +00:00
Jonathan Hefner
0a2ba78402
Merge pull request #44598 from araishikeiwai/patch-1
Improve autoloading_and_reloading_constants.md [ci-skip]
2022-03-13 12:56:44 -05:00
Ghouse Mohamed
9d6cc4114b More rdoc improvements to activesupport 2022-03-13 23:22:48 +05:30
Rick Daniel
186bfc9c30 Improve autoloading_and_reloading_constants.md
Co-authored-by: Hartley McGuire <skipkayhil@gmail.com>
Co-authored-by: Petrik de Heus <petrik@deheus.net>
2022-03-13 13:33:40 -04:00
Jonathan Hefner
a15543a50f
Merge pull request #44675 from ghousemohamed/fix-rdoc-highlight-in-active-support-key-generator
Fixed rdoc typo highlighting for ActiveSupport::KeyGenerator class [ci-skip]
2022-03-13 11:41:19 -05:00
Ghouse Mohamed
475756db96 Fixed rdoc highlighting for ActiveSupport::KeyGenerator class 2022-03-13 22:02:49 +05:30
Jonathan Hefner
e44d0806fc
Merge pull request #44672 from duffuniverse/update-docs-reopening-existing-classes-using-active-support-concern
Fix typo in engines guide for reopening existing classes using concern [ci-skip]
2022-03-13 11:32:32 -05:00
Vipul A M
5a1f67d7f6
Merge pull request #44674 from swaathi/fix-guides-active-record-multiple-databases 2022-03-13 09:39:14 -04:00
Andrey Sobolev
78ba02267a Reword comment in engines guide 2022-03-13 11:56:50 +03:00
Swaathi Kakarla
b3c5db5455
Fix syntax error in PrimaryApplicationRecord 2022-03-13 13:14:57 +05:30
Jonathan Hefner
c3d4ab00b6
Merge pull request #44660 from julianrubisch/patch-1
Fix ChatRelayJob definition in Testing Guide [ci-skip]
2022-03-12 11:31:11 -06:00
Andrew White
7f5b3e04c8
Use controller_class_path in NamedBase#route_url
The `route_url` method now returns the correct path when generating
a namespaced controller with a top-level model using `--model-name`.

Fixes #44662.
2022-03-12 09:45:10 +00:00
Rafael Mendonça França
a807a4f4f9
Merge pull request #44663 from acallaghan/master
Remove unmaintained francesc/rails-translate-routes gem
2022-03-11 13:53:15 -05:00
Rafael Mendonça França
d6f2e17908
Make sure allowed image processing arguments are correctly loaded
If for some reason the files that defined those constants were loaded
before the `after_initialize` block, the values of the configuration
would not be applied.

With this new implementation we always use the configuration value, so
the order things are defined doesn't matter.
2022-03-11 17:45:39 +00:00
Andy Callaghan
15dc5db9da Remove unmaintained francesc/rails-translate-routes gem
The other two gems here are modern and kept up with modern Rails, and
this one hasn't
2022-03-11 17:34:44 +00:00
Julian Rubisch
66ff8b1439
Fix ChatRelayJob definition in Testing Guide
The `ChatRelayJob` under "14.3 Custom Assertions And Testing Broadcasts Inside Other Components" defined a `perform_later` method, which I think should just be `perform`.
2022-03-11 09:51:11 +01:00
Aaron Patterson
1bca3cc406
Merge pull request #44650 from tomhughes/relative-redirect
Allow relative redirects when `raise_on_open_redirects` is enabled
2022-03-10 09:10:55 -08:00
Jean Boussier
190291dc45
Merge pull request #44596 from fractaledmind/patch-1
Use #attribute_names in ActiveRecord::Core#inspect
2022-03-10 14:27:44 +01:00
Stephen Margheim
3c02ef95e9
Add test for inspecting a Relation with a virtual field 2022-03-10 11:35:51 +01:00
Lewis Buckley
246c13f8df
Change the AS::Notification payload to include the mailbox instance 2022-03-10 09:43:34 +00:00
Tom Hughes
24ebaa4e83 Allow relative redirects when raise_on_open_redirects is enabled 2022-03-10 00:41:49 +00:00
Aaron Patterson
2c21a39493
Merge pull request #44387 from piecehealth/fix_activestorage_update
fix activestorage update
2022-03-09 16:12:48 -08:00
Aaron Patterson
212463d5e6
Merge pull request #44648 from kaiquekandykoga/docs-mattrs
Documentation mattr_(reader|writer|accessor)
2022-03-09 16:06:26 -08:00
Kaíque Kandy Koga
d89be419ba Add examples of default values using blocks for mattr_reader, mattr_writer and mattr_accessor 2022-03-09 18:58:08 -03:00
Aaron Patterson
2837572fab
Merge pull request #44647 from ghousemohamed/removed-unwanted-tempfile-requires
Removed unwanted requires of `tempfile` and fix rubocop errors
2022-03-09 12:12:31 -08:00
Ghouse Mohamed
42b2869d06 Removed unwanted requires of and fixed rubocop errors 2022-03-10 01:19:55 +05:30
Aaron Patterson
44e5a31d85
Merge pull request #44644 from tonobo/active_support_inheritable_options_add_dig
ActiveSupport::OrderedOptions handle custom #dig
2022-03-09 10:48:12 -08:00
Aaron Patterson
fa50f7c92f
Merge pull request #44643 from lewispb/action-mailbox-instrumentation
Instrument Action Mailbox processing
2022-03-09 10:45:43 -08:00
John Hawthorn
9070d563b9
Merge pull request #44617 from nholden/destroy-async-batch
Add `active_record.destroy_association_async_batch_size` configuration
2022-03-09 10:16:28 -08:00
Nick Holden
c773ae65af Add active_record.destroy_association_async_batch_size configuration
This allows applications to specify the maximum number of records that
will be destroyed in a single background job by the `dependent:
:destroy_async` association option. By default, the current behavior
will remain the same: when a parent record is destroyed, all dependent
records will be destroyed in a single background job. If the number of
dependent records is greater than this configuration, the records will
be destroyed in multiple background jobs.

At GitHub, we have a custom method for destroying associated records
in the background that we'd like to replace with
`dependent: :destroy_async`. Some associations have a large number of
dependent records, and our infrastructure requires that background jobs
complete quickly, so we limit the maximum number of dependent records
destroyed in a single background job and enqueue additional jobs when
the number of records exceeds that limit.
2022-03-09 11:13:16 -07:00
Eileen M. Uchitelle
7684256ede
Merge pull request #44637 from fatkodima/remove_foreign_key-if_exists
Fix `remove_foreign_key` with `:if_exists` option when foreign key actually exists
2022-03-09 09:22:02 -05:00
Tim Foerster
5c15b586aa
ActiveSupport::OrderedOptions handle custom #dig
Common access via #[](arg) is being casted to symbol, same behavior should be provided on using #dig in order be consistent
2022-03-09 12:42:03 +01:00
Lewis Buckley
599e73bc00
Instrument Action Mailbox processing
Use ActiveSupport::Notifications to instrument Action Mailbox for
logging or performance monitoring.
2022-03-09 10:06:43 +00:00
Aaron Patterson
8516bb6804
Merge pull request #44635 from imtayadeway/tjw/api-csp-i
Generate content security policy for non-HTML responses
2022-03-08 13:23:15 -08:00
Aaron Patterson
a65c31e537
Merge pull request #44639 from pvalena/patch-4
Add missing require to activerecord base_test.rb
2022-03-08 13:01:21 -08:00
Aaron Patterson
6b9ca00845
Merge pull request #44641 from SkipKayhil/fix-rubocop-errors
fix rubocop errors
2022-03-08 13:01:00 -08:00