Commit Graph

91784 Commits

Author SHA1 Message Date
Rafael Mendonça França
6a283acf4c
Merge pull request #50228 from cedriccarrard/fix-50189-docs-mismatch-between-revert-code-example-and-subsequent-steps
Adjusted an example to align with the documentation section on reversing a previous migration.
2024-05-22 16:14:51 -04:00
Rafael Mendonça França
486bb99480
Use rails fork for rdoc gem
This allow us to actually get a working gem from github.
2024-05-22 20:06:10 +00:00
Cédric Carrard
992dbd791c
fix #50189 docs section reverting previous migrations mismatch code example 2024-05-22 21:09:42 +02:00
Rafael Mendonça França
b504498c97
Upgrade rdoc to get https://github.com/ruby/rdoc/pull/1096 2024-05-22 18:57:08 +00:00
Rafael Mendonça França
5b7a9c4e88
Merge pull request #51876 from skipkayhil/hm-tmp-fix-md-dl
Temporarily fix multi-paragraph definition lists [ci skip]
2024-05-22 14:55:14 -04:00
Rafael Mendonça França
c0a2b28038
Revert "Merge pull request #50489 from maniSHarma7575/50481-fix-activesupport-json-encode"
This reverts commit 7b9e9ee244350eeb89cd4bb4ac1ff817d82f3669, reversing
changes made to 590a675c4ecfaa9b7b06787a30adeb0136524879.

Reason: https://github.com/rails/rails/pull/50489#issuecomment-2123881327
2024-05-22 18:13:23 +00:00
Eileen M. Uchitelle
26f8edf411
Merge pull request #51881 from ngan/document-transaction.active_record
Document the transaction.active_record event
2024-05-22 09:11:57 -04:00
Ngan Pham
397585c22c
Document the transaction.active_record event 2024-05-21 16:43:42 -07:00
eileencodes
bd04126e79
Fix typo 2024-05-21 19:06:44 -04:00
Eileen M. Uchitelle
0596f4de18
Merge pull request #51879 from eileencodes/add-test-and-fix-changelog-for-51878
Add test and fix changelog for `schema_cache_ignored_table?`
2024-05-21 16:32:27 -04:00
eileencodes
227c590d02
Add test and fix changelog for schema_cache_ignored_table? 2024-05-21 15:37:38 -04:00
Eileen M. Uchitelle
2281edf99e
Merge pull request #51878 from eileencodes/add-public-sc-ignored-tables-check
Make public method for `schema_cache_ignored_tables?`
2024-05-21 15:33:51 -04:00
eileencodes
e815c6663a
Make public method for schema_cache_ignored_tables?
Previously we only provided a method to set the ignored schema cache
tables, but there was no way to ask if a table was ignored by the schema
cache. Applications may want to implement their own schema cache, or at
least run this check. Rather than forcing them to implement an internal
method, this adds a way to ask whether a table is ignored by the schema
cache code.

Usage:

```ruby
ActiveRecord.schema_cache_ignored_tables = ["developers"]
ActiveRecord.schema_cache_ignored_tables?("developers")
```
2024-05-21 14:42:25 -04:00
Hartley McGuire
8cbf969e09
Temporarily fix multi-paragraph definition lists
The rdoc markdown parser does not currently parse multi-paragraph
definition lists correctly. Instead of putting both paragraphs inside
a single definition, only the first paragraph ends up in the definition
and the second paragraph is rendered after the definition list as a code
block.

Since 7.2 appears to be coming soon, this commit fixes the second
paragraph rendering as a code block by turning it into a second
definition. This doesn't strictly seem like the "correct" fix (compared
to fixing the rdoc markdown parser) but it gives us the visual result
that we want until rdoc is fixed.
2024-05-21 11:48:01 -04:00
Xavier Noria
1b534a4d10 ActiveRecord -> Active Record 2024-05-21 14:24:28 +02:00
Yasuo Honda
692f25a925
Merge pull request #51856 from yahonda/restore_warning_condition_for_ruby34
Restore unused block warnings condition for Ruby 3.4
2024-05-21 08:46:51 +09:00
Yasuo Honda
5c92d45e8a
Merge pull request #51838 from jeromedalbert/no-kamal-storage-volume-if-not-needed
Don’t configure Kamal storage volume if not needed
2024-05-21 08:46:26 +09:00
Yasuo Honda
ba6e556f39
Merge pull request #51837 from jeromedalbert/no-storage-if-not-needed-1
Don’t create storage folder if not needed
2024-05-21 08:45:57 +09:00
Andrey Sobolev
4da74fe880
Add a comma in exceptions section of instrumentation guide 2024-05-20 16:33:30 +03:00
Jean Boussier
cd31b164b1
Merge pull request #51731 from Shopify/improve-rails-helpers-descriptions
Improve Rails console helper methods' descriptions
2024-05-20 18:55:38 +09:00
Jean Boussier
7ad4d8f896
Merge pull request #51304 from nikhilbhatt/fix_exception_raised_should_show_template_code
Fix exception raised from template should not show compiled code
2024-05-20 17:15:02 +09:00
nikhilbhatt
575c6413bb Fix exception raised from template should not show compiled code 2024-05-20 17:07:19 +09:00
Jerome Dalbert
3156e50838
Don’t configure Kamal storage volume if not needed
Configuring a persistent storage volume in Kamal
is needed only for sqlite or Active Storage. If
using a different database or the
--skip-active-storage option, this configuration
can be skipped.
2024-05-19 18:30:36 -07:00
Stan Lo
53a0b8c662
Improve Rails console helper methods' descriptions 2024-05-19 23:03:26 +09:00
Chris Oliver
7594a73942
Add rubocop and GitHub Actions to plugin generator
When creating new Rails plugins, rubocop and GitHub Actions are now
included to make linting and testing easier.
2024-05-18 09:19:12 -05:00
fatkodima
0318c34cb3 Fix non-partial inserts for models with composite identity primary keys 2024-05-18 12:08:33 +03:00
Yasuo Honda
cba2b2f588 Restore unused block warnings condition for Ruby 3.4
https://github.com/ruby/ruby/pull/10403 raised many "the block passed to" warnings.
then idnored these warnings because some of them might have contain false positives.

Now we can restore the warning condition
because these false positives should have been addressed by these changes:

https://github.com/ruby/ruby/pull/10559
https://github.com/rails/rails/pull/51597
https://github.com/rails/rails/pull/51583
2024-05-18 08:57:11 +09:00
Yasuo Honda
965b8c372a
Merge pull request #51854 from yahonda/address_rubocop_offenses_since_51826
Address `Layout/IndentationWidth` cop offenses
2024-05-18 08:49:32 +09:00
Yasuo Honda
b708a1b9dd Address Layout/IndentationWidth cop offenses
This commit addresses RuboCop offenses reported at
https://buildkite.com/rails/rails/builds/107320#018f8835-b770-4068-9b97-0aec28c7ddb3

- Offenses are addressed by RuboCop auto correction as follows
```
$ bundle exec rubocop -a activerecord/test/cases/connection_adapters/type_lookup_test.rb
Inspecting 1 file
C

Offenses:

activerecord/test/cases/connection_adapters/type_lookup_test.rb:91:9: C: [Corrected] Layout/IndentationWidth: Use 2 (not 3) spaces for indentation.
           %w{decimal(2) decimal(2,0) numeric(2) numeric(2,0) number(2) number(2,0)}.each do |type|
        ^^^
activerecord/test/cases/connection_adapters/type_lookup_test.rb:92:11: C: [Corrected] Layout/IndentationWidth: Use 2 (not 3) spaces for indentation.
             cast_type = @connection.send(:type_map).lookup(type)
          ^^^
activerecord/test/cases/connection_adapters/type_lookup_test.rb:94:14: C: [Corrected] Layout/IndentationConsistency: Inconsistent indentation detected.
             assert_equal :decimal, cast_type.type
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
activerecord/test/cases/connection_adapters/type_lookup_test.rb:95:14: C: [Corrected] Layout/IndentationConsistency: Inconsistent indentation detected.
             assert_equal 2, cast_type.cast(2.1)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

1 file inspected, 4 offenses detected, 4 offenses corrected
$
```

Follow up #51826
2024-05-18 07:49:08 +09:00
Rafael Mendonça França
d0ce794e2d
Merge pull request #51442 from rosa/skip-deprecation-warning-for-invalid-reflections
Emit deprecation warning about inverse_of inference only for valid reflections
2024-05-17 16:38:06 -04:00
Rafael Mendonça França
59eb4f49a0
Merge pull request #51826 from Shopify/remove-oracle-sqlserver-from-tests
Remove oracle sqlserver from tests
2024-05-17 16:18:30 -04:00
Rafael Mendonça França
4964049784
Merge pull request #51011 from rails/revert-50978-pin_minitest_521
Revert "Pin minitest version to 5.21"
2024-05-17 16:14:12 -04:00
Jerome Dalbert
918c71fa5a Don’t create storage/ directory if not needed
The storage/ directory is used for sqlite or
Active Storage. If using a different database
and the --skip-active-storage option, this
directory is not needed.
2024-05-17 10:52:15 -07:00
Rafael Mendonça França
161d98dec2
Merge branch 'rm-trix' 2024-05-16 19:26:43 +00:00
Rafael Mendonça França
f3f2773c52
Upgrade Trix to 2.1.1 to fix [CVE-2024-34341][1]
[1]: https://github.com/basecamp/trix/security/advisories/GHSA-qjqp-xr96-cj99
2024-05-16 19:25:47 +00:00
Carlos Antonio da Silva
705b70a2f1
Merge pull request #51833 from akhilgkrishnan/remove-unnecessary-changes
Remove 7.2 release changes from Rails 8.0 release note [ci skip]
2024-05-16 10:21:59 -03:00
Carlos Antonio da Silva
49d4b1c311
Merge pull request #51834 from akhilgkrishnan/point-7-2-stable
Point 7-2-stable branch CHANGELOGS in rails 7-2 release note [ci skip]
2024-05-16 10:17:28 -03:00
Carlos Antonio da Silva
44b142452b
Merge pull request #51840 from p8/guides/i18n-repo
Update link to `i18n` gem repository [ci-skip]
2024-05-16 10:12:15 -03:00
eileencodes
ccd5a25e98
Clarify contributing doc to not ping maintainers 2024-05-16 09:10:58 -04:00
Josef Šimánek
a27a038dc3 Catch StandardError during Base64 decoding in message encryptor. 2024-05-16 03:24:52 +02:00
Hartley McGuire
6ec2384e07
Allow test command invocations to exit failure
Minitest will now exit 1 when a `-n` type test filter is used and no
test cases end up being run. However, these tests are not really
concerned with the exit code, just that `test:prepare` doesn't run.

This commit adds `allow_failure: true` to the test command invocations
so that we can continue to test whether `test:prepare` is run without
caring about the exit status of the test command.
2024-05-15 18:50:06 -04:00
zzak
f12bbb61d1
Revert "Pin minitest version to 5.21" 2024-05-15 18:05:43 -04:00
David Heinemeier Hansson
427fe4a6c5
By definition, new apps wont have any deprecations to worry about. So dont expose those controls for new apps by default (#51831) 2024-05-15 12:02:07 -07:00
Rafael Mendonça França
a82e432b83
Merge pull request #51763 from JoeDupuis/postgresql-adapter-decode-dates-config
Add `active_record.postgresql_adapter_decode_dates` config
2024-05-15 14:55:15 -04:00
Rafael Mendonça França
b56ee17db6
Merge pull request #51783 from JoeDupuis/fix-fail-fast-flake
Fix test runner --fail-fast test flake
2024-05-15 14:42:06 -04:00
Joé Dupuis
478874ae1b
Add active_record.postgresql_adapter_decode_dates
to toggle automatic decoding of dates column with the
PostgresqlAdapter.

PR #51483 is a breaking change and should have been gated behind a
config.
2024-05-15 18:38:08 +00:00
Petrik
0f2487b579 Update link to i18n gem repository [ci-skip]
The repository got moved to the `ruby-i18n` organization.
The google group no longer seems to be active and is removed as well.
2024-05-15 14:59:27 +02:00
Akhil G Krishnan
df15073efd Point 7-2-stable branch CHANGELOGS in rails 7-2 release note 2024-05-15 09:20:28 +05:30
Akhil G Krishnan
84fa2f6d15 Remove 7.2 release changes from Rails 8.0 release note 2024-05-15 08:45:49 +05:30
Carlos Antonio da Silva
72fccfb5d6 Fix console tests
We need to pass the verbose option in order to test the full expected
output. Not sure why these were green on the branch.

Introduced by #51732.
2024-05-14 20:59:11 -03:00