Commit Graph

88922 Commits

Author SHA1 Message Date
Noah Gibbs
0501555800
Note that guide text should wrap at 80 columns 2023-09-08 13:22:28 +01:00
Akhil G Krishnan
cafad7a23a
Remove unused webpacker related files 2023-09-08 11:22:09 +00:00
Ryuta Kamizono
099f979dc7
Merge pull request #49195 from p8/activestorage/variant-interface
Keep VariantWithRecord API consistent with Variant
2023-09-08 17:52:05 +09:00
Ryuta Kamizono
9b00c65aeb
Merge pull request #49196 from p8/activestorage/remove-unused-methods
Remove unused methods on ActiveStorage::Variant
2023-09-08 17:31:01 +09:00
Petrik
1e23fff1a1 Remove unused methods on ActiveStorage::Variant
These methods were added in b221a4dc43368a1b6f00476f7c5f6047c5c7eea4
But they don't seem to be used by Rails internally or have any tests, so
I assume they were added by accident?
As they both seem to be marked as :nodoc: on ActiveStorage::Blob, we can
remove them without a deprecation warning.

If we decide to keep these methods, they should be added to
ActiveStorage::VariantWithRecord as well. No one complaining about there
methods missing on ActiveStorage::VariantWithRecord is another reason
these methods aren't used.
2023-09-08 10:05:56 +02:00
Petrik
3e27f43dbc Keep VariantWithRecord API consistent with Variant
Similar to c18bcd582819212c0d8d5523f7918cd4c1c4d53f adds the
content_type and filename methods to VariantWithRecord.
2023-09-08 08:24:20 +02:00
Adrianna Chang
44bd6e7aca
Merge pull request #49182 from adrianna-chang-shopify/ac-document-associations-cpk-models
Document associations between models with composite primary keys in guides [ci skip]
2023-09-07 14:13:55 -04:00
Adrianna Chang
006b91719d
Merge pull request #49188 from adrianna-chang-shopify/ac-document-more-finder-methods-cpk
Add additional docs to Query Interface guide about composite primary key models [ci skip]
2023-09-07 14:12:46 -04:00
Adrianna Chang
a6faf080fe
Document associations between models with composite primary keys in Rails guides 2023-09-07 14:11:05 -04:00
Adrianna Chang
ed58ce03ee
Add additional docs to Query Interface guide about composite primary key models 2023-09-07 14:02:44 -04:00
Vipul A M
bc2892ab45
Merge pull request #49191 from Shopify/fix-typo-in-id-value-docs
Fix typo in id_value docs
2023-09-07 23:12:13 +05:30
Nikita Vasilevsky
43d1db0d35
Fix typo in id_value docs 2023-09-07 17:39:01 +00:00
Petrik de Heus
d37fcce177
Merge pull request #49190 from akhilgkrishnan/deprecated-to-deprecate
[skip ci] Made a consistant wording across the notes
2023-09-07 19:22:09 +02:00
Akhil G Krishnan
73eb8bccdd
[skip ci] Made a consistant wording accross the notes 2023-09-07 17:14:18 +00:00
Hartley McGuire
0851a878d3
Merge pull request #49170 from higher-pixels/delete-async
Improving the setup for the Active Record Encryption Guide
2023-09-07 11:28:36 -04:00
Adrianna Chang
9dc2288d64
Merge pull request #49179 from Shopify/cpk-release-notes
[ci skip] Add composite primary key release note
2023-09-07 10:49:57 -04:00
Nikita Vasilevsky
53e690e623
Add composite primary key release note 2023-09-07 14:42:55 +00:00
Tom Rossi
2ccc2c2fe2 Improving the Rails Guide around setting up Active Record Encryption 2023-09-07 08:09:14 -04:00
Jonathan Hefner
4986cfb26e
Merge pull request #49141 from ghiculescu/declarative-specs-2
Fix more bugs in declarative specs filter
2023-09-06 21:47:59 -05:00
Alex
0a8e5374b9 Simplify normalization of regexp test filters
Follow-up to #47942.

This commit simplifies the normalization of regexp test filters.
Instead of modifying a given regexp to match a union of whitespace and
underscores, the regexp is unioned with the underscore-normalized
version of itself.  This allows filters that include escaped spaces,
such as `/foo\ bar/`.

This commit also fixes `Rails::LineFiltering#run` such that
normalization isn't reapplied for every test suite.  Thus
`normalize_declarative_test_filter` is no longer required to be
idempotent.

Co-authored-by: Jonathan Hefner <jonathan@hefner.pro>
2023-09-06 21:30:51 -05:00
Jonathan Hefner
4a08111ec6
Merge pull request #49172 from akhilgkrishnan/ruby-code-block-intentation-fix
[ci-skip] Ruby code block indentation issue fix
2023-09-06 17:24:29 -05:00
Cody Cutrer
bb783cad08 Adds support for if_not_exists when adding a check constraint.
The `add_check_constraint` method now accepts an `if_not_exists` option. If set to true an error won't be raised
if the check constraint already exists. In addition, `if_exists` and `if_not_exists` options are transposed
if set when reversing `remove_check_constraint` and `add_check_constraint`. This enables simple creation
of idempotent, non-transactional migrations.
2023-09-06 14:54:59 -06:00
Jean Boussier
6370bfd576
Merge pull request #49176 from ccutrer/mysql2-m1-mac
Update mysql2 gem
2023-09-06 22:54:20 +02:00
Jean Boussier
304f0a3c01
Merge pull request #49173 from Shopify/define-alias-attribute-methods-in-define_attribute_methods
Define alias attribute methods in `define_attribute_methods`
2023-09-06 22:53:43 +02:00
Cody Cutrer
e02ac345e8 Fix remove_check_constraint with if_exists: true never removing any check constraint
It was never finding existing constraints, because `CheckConstraintDefinition` was
validating all options--including `if_exists`--matched.
2023-09-06 14:07:40 -06:00
Nikita Vasilevsky
0f5563bd40
Define alias attribute methods in define_attribute_methods
`undefine_attribute_methods` now removes alias attribute methods along
with attribute methods. This commit changes `define_attribute_methods` to
redefine methods back if any alias attributes were declared which provides
applications and libraries an option to bring the alias methods back
after using `undefine_attribute_methods`.
2023-09-06 20:06:39 +00:00
Akhil G Krishnan
61a9c1a92a Ruby code block indentation issue fix
[skip ci] indentation fix

[skip ci] review changes added

[skip ci] indentation fix
2023-09-07 01:14:48 +05:30
Cody Cutrer
6adfe05f9e Update mysql2 gem
So that it can find the mysql libraries with homebrew on arm64
2023-09-06 13:27:27 -06:00
Jean Boussier
9044d35c2f
Merge pull request #49166 from aleksclark/ensure-identical-dump-files
ensure identical md5 sums for gzip schema cache
2023-09-06 20:00:59 +02:00
Rafael Mendonça França
ea6f3f08ca
Merge pull request #49171 from akhilgkrishnan/remove-webpacker-files
Removed Webpacker Isolation files
2023-09-06 13:57:19 -04:00
Akhil G Krishnan
59854da1bf
Removed Webpacker files 2023-09-06 17:11:58 +00:00
Gannon McGibbon
6debd54d24
Merge pull request #49156 from gmcgibbon/cpk_fixtures
Add composite primary key examples to fixture docs
2023-09-06 12:11:06 -05:00
Gannon McGibbon
cd1289d30b [skip ci] Add composite primary key examples to fixture docs
It isn't clear how to associate composite primary key table fixtures,
so let's add an example to ActiveRecord::FixtureSet's documentation.
2023-09-06 11:39:59 -05:00
Rafael Mendonça França
0ee95801f3
Merge pull request #49167 from Uaitt/bump-actions-checkout-version
Bump github actions/checkout to v4
2023-09-06 11:49:01 -04:00
Rafael Mendonça França
b6166e8da2
Merge pull request #49056 from joshuay03/raise-on-duplicate-accepts-nested-attributes-for
[Fix #49055] Raise an `ArgumentError` when `#accepts_nested_attributes_for` is redeclared for an association
2023-09-06 11:47:41 -04:00
Joshua Young
0a54155757
[Fix #49055] Raise an ArgumentError when #accepts_nested_attributes_for is redeclared for an association 2023-09-06 15:27:59 +00:00
Lorenzo Zabot
b5a5c191f2 Bump github actions/checkout to v4 2023-09-06 15:05:32 +02:00
Aleks Clark
8889a2689b
add comment 2023-09-06 05:44:38 -05:00
Aleks Clark
56e1ecdb56
set mtime = 0 in schema gz dump in order to ensure identical md5 sums for identical contents 2023-09-06 05:36:31 -05:00
Ryuta Kamizono
5415d3a19a Remove "proc to update web drivers." [ci-skip]
Follow-up to #48847.

This was originally "The webdrivers gem uses this proc to update web
drivers.".
2023-09-06 13:23:14 +09:00
Akhil G Krishnan
7b8eadba02
[skip ci] ActiveSupport deprecate changes added to 7.1 release note (#49119)
* [skip ci] ActiveSupport deprecate changes added to 7.1 release note

* Update guides/source/7_1_release_notes.md

Co-authored-by: Adrianna Chang <adrianna.chang@shopify.com>

---------

Co-authored-by: Rafael Mendonça França <rafael@rubyonrails.org>
Co-authored-by: Adrianna Chang <adrianna.chang@shopify.com>
2023-09-05 16:29:07 -04:00
Rafael Mendonça França
e1cfcb1951
Fix indentation in 7.1 release notes 2023-09-05 20:27:06 +00:00
Rafael Mendonça França
f9e4fb9bed
Merge pull request #49152 from yahonda/bigdecimal_314_or_higher_will_be_installed
Just check the BigDecimal 3.1+ behavior at `NumericalityValidationTest`
2023-09-05 15:59:23 -04:00
Jonathan Hefner
5cca7f9fa7
Merge pull request #49161 from jonathanhefner/remove-unused-fixtures-in-connection_test
Remove unused fixtures in `*ConnectionTest`
2023-09-05 14:29:37 -05:00
Rafael Mendonça França
5bd10ff533
Merge pull request #49118 from akhilgkrishnan/generate-token-for-release-note
[skip ci] Description added for `ActiveRecord::Base.generates_token_for` method in 7.1 release note
2023-09-05 15:21:38 -04:00
Jonathan Hefner
fe87afe022 Remove unused fixtures in *ConnectionTest
These fixtures were added in 9a4e183fe9f81365f7815c391512b3d46622d8c8 to
test the behavior of `connection.truncate`, but then the relevant tests
were extracted to `AdapterTestWithoutTransaction` in
fdac932707fb16b7d074b1d0bc7c255157d72675.
2023-09-05 14:11:29 -05:00
Rafael Mendonça França
43617c4cea
Merge pull request #49157 from adrianna-chang-shopify/ac-contrib-docs-addition
[ci skip] Instruct contributors to use 'ci skip' when submitting docs
2023-09-05 15:07:07 -04:00
Jonathan Hefner
5dfa45bb92
Merge pull request #49159 from jonathanhefner/fix-49143
Load ambient fixtures for `ActiveRecordMessagePackTest`
2023-09-05 13:56:07 -05:00
Jonathan Hefner
69e6bae020 Load ambient fixtures for ActiveRecordMessagePackTest
`ActiveRecordMessagePackTest` does not use any fixtures, but fixtures
that were previously loaded without preserving referential integrity can
affect query results.  For example, if previous tests load `:comments`
fixtures but not `:posts` fixtures, there will be `Comment` records in
the database with `post_id = 1` but no corresponding `Post` record.
Then, when a `Post` is created in `ActiveRecordMessagePackTest`, its
`comments` association will accidentally include those prior `Comment`
records.

This commit loads ambient fixtures for the relevant models in
`ActiveRecordMessagePackTest` to prevent such accidental results.

Fixes #49143.
2023-09-05 13:36:21 -05:00
Eileen M. Uchitelle
20df3820a0
Merge pull request #49154 from Shopify/query-constraints-option-in-associations
Document `query_constraints` option in associations
2023-09-05 14:09:03 -04:00