Rafael Mendonça França
c906f75282
Merge pull request #51822 from excid3/plugin-github-actions
...
Add rubocop and GitHub Actions to plugin generator
2024-05-23 14:08:58 -04:00
Rafael Mendonça França
4febb0677f
Merge pull request #51888 from Earlopain/revert-rubocop-workaround
...
Revert RuboCop workaround
2024-05-23 13:56:44 -04:00
Rafael Mendonça França
37227c7bbd
Merge pull request #51885 from tnir/tn-remove-webpack-from-deps
...
chore: remove webpack from yarn dependencies in Rails dev
2024-05-23 13:53:51 -04:00
Indigo Tech
3855416df8
fix the direct upload class example
2024-05-23 11:54:46 -05:00
Rafael Mendonça França
43e4916483
Merge pull request #51891 from flavorjones/flavorjones-update-sqlite3-test-messages
...
update sqlite3 adapter tests to accept error messages from v3.46.0
2024-05-23 12:26:05 -04:00
Takuya Noguchi
a5ae420c34
chore: remove webpack from yarn dependencies in Rails dev
...
This dependency was originally introduced in PR 33079 in
Rails 6.0 (2018).
Follows up PR 43172, which replaced webpacker 6 with
jsbundling-rails in Rails 7.0 (2021).
Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
2024-05-23 16:25:00 +00:00
Rafael Mendonça França
8ea62041ae
Merge pull request #51866 from tnir/tn-update-eslint-from-4.3.0-to-8.40.0
...
chore(deps-dev): update eslint from 4.19.1 to 8.40.0
2024-05-23 12:23:12 -04:00
Rafael Mendonça França
97cc321280
Point to the right executable when warning about --profile
2024-05-23 16:19:53 +00:00
Rafael Mendonça França
7ee34d9efb
Enable Rails minitest plugin in our rake tasks
2024-05-23 16:16:37 +00:00
Florin Oltean
372d327b91
Make pretty_print behave more similar to inspect.
2024-05-23 18:11:13 +02:00
Rafael Mendonça França
fd6c266266
Merge pull request #51890 from tnir/tn-update-pg-in-brewfile
...
chore: update Brewfile per renaming postgresql Formula
2024-05-23 12:04:02 -04:00
Mike Dalessio
b2660d6f45
update sqlite3 adapter tests to accept error messages from v3.46.0
...
Upstream sqlite updated the error messages to be more descriptive
starting in v3.46.0. Where the error message might look like this in
earlier versions:
no such column: non_existent
in 3.46.0 it looks like:
no such column: "non_existent" - should this be a string literal in single-quotes?
The tests have been updated to accept either style of message.
The sqlite3-ruby gem will release a version with this vendored version
shortly, see https://github.com/sparklemotion/sqlite3-ruby/pull/536
2024-05-23 11:50:52 -04:00
Takuya Noguchi
27cb8c618c
chore: update Brewfile per renaming postgresql Formula
...
postgresql was renamed to postgresql@14 in the Homebrew upstream
and now postgresql@16 is the latest stable, so we can use
postgresql@16 in the development environment.
cf.
8060df9169
Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
2024-05-23 13:47:57 +00:00
Earlopain
720c7d14dd
Revert RuboCop workaround
...
Was done in 3e08223ece
to work around a RuboCop bug.
The newest version has this fixed.
2024-05-23 14:56:53 +02:00
zzak
95a6729de8
Merge pull request #51886 from zzak/revert-51184
...
Revert "Merge pull request #51184 from ConfusedVorlon/document_after_commit_deduplication"
2024-05-23 20:51:37 +09:00
zzak
d4150ab5cb
Revert "Merge pull request #51184 from ConfusedVorlon/document_after_commit_deduplication"
...
This reverts commit 2abee307fe
, reversing
changes made to e34a0eec38
.
A warning on each method is excessive and the warning should already be covered under the guide:
https://edgeguides.rubyonrails.org/active_record_callbacks.html#transaction-callbacks
2024-05-23 20:09:09 +09:00
Takuya Noguchi
b6e49a7b1f
chore(deps-dev): update eslint from 4.3.0 to 8.40.0
...
Also update eslint-plugin-import from 2.27.5 to 2.29.0.
Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
2024-05-23 14:23:15 +09:00
Rafael Mendonça França
cacb8475a9
Merge pull request #51721 from joshuay03/fix-same-association-name-as-demodularized-model-name
...
[Fix #51720 ] Infer association klass as top level if model has same demodularized name
2024-05-22 19:46:14 -04:00
Joshua Young
0516eafda2
[ Fix #51720 ] Infer association klass as top level if model has same demodularized name
2024-05-23 08:04:57 +09:00
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 7b9e9ee244
, reversing
changes made to 590a675c4e
.
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