Commit Graph

89385 Commits

Author SHA1 Message Date
Rafael Montas
dd8f6e5cbb Fix typo in configuring guide 2023-10-14 12:59:35 +00:00
Rafael Mendonça França
4d2be091ba
Fix changelog linter to not run indefinitely on invalid changelogs 2023-10-13 23:14:43 +00:00
Rafael Mendonça França
1d11c765cc
Merge pull request #49628 from Shopify/enable-minitest-assert-predicate-rubocop-rule
[Tests only] Enable `Minitest/AssertPredicate` rule
2023-10-13 21:51:35 +02:00
Nikita Vasilevsky
19f8ab2e7d
[Tests only] Enable Minitest/AssertPredicate rule 2023-10-13 19:26:47 +00:00
Rafael Mendonça França
41a56044e6
This will be released in 7.1 2023-10-13 18:09:46 +00:00
Rafael Mendonça França
11e3afb141
Merge pull request #49625 from Shopify/disallow-association-fk-as-an-array
Raise on `foreign_key:` being passed as an array in associations
2023-10-13 20:05:14 +02:00
Rafael Mendonça França
23ee0b9efa
Merge pull request #49626 from szTheory/patch-2
Docs typo: rails/railties/lib/rails/engine.rb
2023-10-13 20:01:43 +02:00
szTheory
5a553b02e1
Docs typo: rails/railties/lib/rails/engine.rb
Small typo fix in docs for Rails engines
2023-10-13 17:38:01 +00:00
Nikita Vasilevsky
529d1f55a8
Raise on foreign_key: being passed as an array in associations
Associations have never allowed nor supported `foreign_key` option
being passed as an Array. This still holds true for Rails 7.1
However with Rails 7.1 supporting composite primary keys it may become
more common for applications to mistakenly pass an array to `foreign_key:`.
This commit adds an exception to raise when `foreign_key:` is passed as
an array.
2023-10-13 17:10:07 +00:00
Carlos Antonio da Silva
dcb1d1f4c4 Use to_sentence to show list of methods without using I18n
This code was introduced by #17221 to workaround issues with not having
the `:en` locale set in the app to translate when calling `to_sentence`,
when having `I18n.enforce_available_locales` enabled.

We can still use the helper, with the defaults provided by the code,
without using I18n and thus without relying on the app locale, by
passing the `locale: false` option.
2023-10-13 13:10:06 -03:00
Carlos Antonio da Silva
5f3a817dd7 Simplify call / early return with safe navigator
As an extra small benefit, we just do one hash lookup.
2023-10-13 13:10:06 -03:00
Rafael Mendonça França
653725ee7c
Merge pull request #49610 from ezekg/fix/note-on-rails-7-1-sha-1-bug
Add note on active_record.encryption.support_sha1_for_non_deterministic_encryption
2023-10-13 17:14:47 +02:00
eileencodes
23e04dc97d
Make NullInternalMetadata private
This shouldn't have been public. Followup to 938ffba6a32e06c7611194a4ebb8833785e31c62
2023-10-13 09:25:38 -04:00
Rafael Mendonça França
938ffba6a3
Mark NullSchemaMigration as :nodoc:
This isn't public and was marked by mistake.
2023-10-13 13:16:36 +00:00
Rafael Mendonça França
33b1976acb
Merge pull request #49616 from zzak/49588
Support handling Enumerator for non-buffered responses
2023-10-13 15:11:21 +02:00
Jean Boussier
c9da2694de
Merge pull request #49621 from Shopify/log-subscriber-semantic-logger-compatibility
ActiveSupport::LogSubscriber restore compatibility with SemanticLogger
2023-10-13 14:34:06 +02:00
Jean Boussier
e01d1e25dd ActiveSupport::LogSubscriber restore compatibility with SemanticLogger
Fix: https://github.com/rails/rails/pull/49563

The semantic_logger gems doesn't behave exactly like stdlib logger
in that `SemanticLogger#level` returns a Symbol while stdlib `Logger#level`
returns an Integer.

Because of this we can't simply compare integers, we have to use the
various `#{level}?` methods.
2023-10-13 14:21:23 +02:00
Jean Boussier
2239749134
Merge pull request #49612 from Shopify/action-view-capture-nil-not-blank
Fix `capture` view helper for HAML and Slim
2023-10-13 08:29:47 +02:00
Jean Boussier
79a242dc54 Fix capture view helper for HAML and Slim
Ref: https://github.com/rails/rails/pull/47194#issuecomment-1760334146

They both give the buffer as return value of the capture block
which confuses the `capture` helper.

Ideally we wouldn't have to check for that, but it's
an acceptable tradeoff for backward compatibility.
2023-10-13 08:27:09 +02:00
Jonathan Hefner
1705fa2bf4
Merge pull request #49617 from cattekin/cast_guides
Use correct tense of `cast` for guides [ci-skip]
2023-10-12 23:01:19 -05:00
Edward Tippett
2130d523b4 Use correct tense of cast for guides
Switch to `cast` for describing the past tense actions.

`casted` is a common mistake, but not correct English.
2023-10-13 13:07:07 +10:30
zzak
6635543d51
Support handling Enumerator for non-buffered responses
The downside to this is that we cannot generate ETags for these types of responses, but are assuming that by using an enumerator they don't expect a buffered response to be cacheable. This means you cannot use Enumerator to generate streaming responses.

Fixes #49588

See also: #47092

Co-authored-by: Samuel Williams <samuel.williams@oriontransfer.co.nz>
2023-10-13 11:12:16 +09:00
Rafael Mendonça França
ab3b206e58
Merge pull request #49592 from fatkodima/pg-table-name-length-back-to-63
Return back maximum allowed PostgreSQL table name to 63 characters
2023-10-13 00:43:17 +02:00
Rafael Mendonça França
7ead85fecf
Merge pull request #49613 from paulreece/bun_install_clarification
[ci skip] Bun docs troubleshooting
2023-10-13 00:41:05 +02:00
paulreece
f5668a0b18 Just clarifies a little the bun installation process and gives people instructions what to do if it did not install. 2023-10-12 18:01:38 -04:00
Carlos Antonio da Silva
31d66f72de
Merge pull request #48767 from c960657/mailer-preview-wrap
Prevent header wrapping in email preview
2023-10-12 18:09:34 -03:00
Carlos Antonio da Silva
056396fea6
Merge pull request #49609 from p8/railties/thor-enum
Use Thor's enum for class_options
2023-10-12 17:21:23 -03:00
Zeke Gabrielse
88ed242498 Add note on support_sha1_for_non_deterministic_encryption 2023-10-12 14:37:30 -05:00
Petrik
b8a3efeee3 Use Thor's enum for class_options
In 11a6adc4fb6172e9af081e20c5f68ca023e3bd8a custom code was added to
restrict values for some `rails new` options.
We don't need to implement this when it's already supported by Thor.

This also adds `none` as an option to the asset_pipeline as used in:
`railties/test/generators/shared_generator_tests.rb:320`.
2023-10-12 21:01:53 +02:00
fatkodima
bd9d7c006a Return back maximum allowed PostgreSQL table name to 63 characters 2023-10-12 20:02:12 +03:00
Rafael Mendonça França
13722f21ee
Merge pull request #49594 from akhilgkrishnan/rails-new-database-desc-consistancy
Add consistent option description for --database on rails new
2023-10-12 18:55:01 +02:00
Adrianna Chang
4c30ca5934
Merge pull request #49605 from Earlopain/unlogged-table-docs
Fix code example for create_unlogged_tables
2023-10-12 11:05:39 -04:00
Earlopain
430d962a79
Fix code example for create_unlogged_tables [ci skip] 2023-10-12 16:31:23 +02:00
Akhil G Krishnan
f953178a75 Add consistant option description for --database on rails new
Review changes added
2023-10-12 19:52:28 +05:30
Carlos Antonio da Silva
bbf4fc9efb
Merge pull request #49603 from y0608/patch-1
Fix broken link in AR validations guide [ci skip]
2023-10-12 10:44:16 -03:00
Carlos Antonio da Silva
837b8d992c
Merge pull request #49602 from Earlopain/49600-followup
Update filter_parameters default in configuring guide [ci skip]
2023-10-12 10:40:59 -03:00
Y.I
bb638b4143
Typo: broken link 2023-10-12 16:30:14 +03:00
Earlopain
227aa4e8c0
Update filter_parameters default in configuring guide [ci skip] 2023-10-12 14:45:55 +02:00
Carlos Antonio da Silva
3d5b2eefa2
Merge pull request #49600 from Earlopain/filter-params-email
Add email to the list of default filter parameters

Email addresses are considered personal data. While not quite on the same level of sensitivity as the other parameters in the list any application that implements signup through email without SSO inadvertently logs this information.
2023-10-12 09:12:59 -03:00
Carlos Antonio da Silva
5103ab167e Fix numbered list and indentation of code blocks on upgrade guide
Otherwise they are considered separate lists instead of a sequence
within the same list. This also renders the code block with extra
indent, as part of the item they belong to.

Also use `Active Record Encryption` with capital letters consistently.

[ci skip]
2023-10-12 08:46:39 -03:00
Earlopain
5af6d285fd
Add email to the list of default filter parameters 2023-10-12 13:39:57 +02:00
Ryuta Kamizono
d5aeb51beb
Merge pull request #49596 from frenkel/fix/credentials-server-doc
Fix documentation for credentails server start command
2023-10-12 20:29:18 +09:00
Ryuta Kamizono
a3695553d4
Merge pull request #49595 from jbampton/fix-grammar
test(ruby): fix grammar
2023-10-12 20:23:53 +09:00
Ryuta Kamizono
68b119a361
Merge pull request #49598 from fatkodima/fix-identity-columns-pg-9
Fix detecting `IDENTITY` columns for PostgreSQL < 10
2023-10-12 20:18:28 +09:00
fatkodima
796e36451f Fix detecting IDENTITY columns for PostgreSQL < 10 2023-10-12 12:30:33 +03:00
fatkodima
cb1a13aeab Fix ActiveRecord tests for PostgreSQL < 10 2023-10-12 12:29:27 +03:00
Frank Groeneveld
2b3782ed8f Fix documentation for credentails server start command 2023-10-12 10:21:23 +02:00
John Bampton
130c0c173a test(ruby): fix grammar 2023-10-12 16:29:58 +10:00
Jonathan Hefner
d7aee014cb Fix monospace formatting [ci-skip] 2023-10-11 23:51:34 -05:00
Jonathan Hefner
5021b46396 Remove unnecessary monospace formatting [ci-skip] 2023-10-11 23:47:52 -05:00