Commit Graph

89337 Commits

Author SHA1 Message Date
Earlopain
227aa4e8c0
Update filter_parameters default in configuring guide [ci skip] 2023-10-12 14:45:55 +02: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
Jonathan Hefner
08c4d63c9a
Merge pull request #49593 from jbampton/fix-spelling
guides/source/asset_pipeline.md: fix spelling [ci-skip]
2023-10-11 23:43:21 -05:00
John Bampton
6cd5254111 guides/source/asset_pipeline.md: fix spelling 2023-10-12 13:54:00 +10:00
Rafael Mendonça França
90a6f3663b
Merge pull request #49587 from jdelStrother/patch-2
Advise upgraders to set active_record.encryption.hash_digest_class
2023-10-12 01:12:36 +02:00
Jonathan del Strother
5f68493cda
Advise upgraders to set active_record.encryption.hash_digest_class
This is currently documented in new_framework_defaults, but deserves highlighting more explicitly to help anyone upgrading from older versions.
2023-10-11 22:51:59 +00:00
Rafael Mendonça França
7228da34b9
Merge pull request #49532 from akhilgkrishnan/base-template-for-7-2-release-note
Added base template for rails 7.2 release note [skip ci]
2023-10-11 23:03:13 +02:00
Rafael Mendonça França
60fc83f4e1
Merge pull request #49535 from t27duck/check_rails_new_options
Disallow invalid values for rails new options
2023-10-11 22:55:12 +02:00
Rafael Mendonça França
fc8d9ed843
Merge pull request #49553 from tricknotes/update-rails-ujs-build
Updated `@rails/ujs` files to follow 8e3449908c59858384ae230d1416c7dcabc8c2dc
2023-10-11 22:44:41 +02:00
Jonathan Hefner
deb51b0895
Merge pull request #49589 from fatkodima/fix-flaky-fixtures-test
Load `author_addresses` fixtures for `ActiveRecordMessagePackTest`
2023-10-11 15:44:33 -05:00
Rafael Mendonça França
2f853e6bed
Merge pull request #49585 from akhilgkrishnan/update-7-1-to-7-2
Updated the rails version in 7.1 to 7.2 in guide [skip ci]
2023-10-11 22:01:30 +02:00
fatkodima
17609f4ccd Load author_addresses fixtures for ActiveRecordMessagePackTest 2023-10-11 22:57:39 +03:00
Matthew Draper
42efd02a87
Merge pull request #49515 from dustinbrownman/main
Don't log enqueuing details when the job wasn't enqueued
2023-10-11 20:22:29 +02:00
Dustin Brown
be9d0f05a4 Don't include enqueuing info when job wasn't enqueued 2023-10-11 10:57:36 -07:00
Carlos Antonio da Silva
c8c95f424e
Merge pull request #49580 from p8/guides/format-html-attributes
Recommend fixed-width fonts for HTML and CSS as well in documentation [ci-skip]
2023-10-11 14:23:27 -03:00
Rafael Mendonça França
452c9f6c71
Merge pull request #49538 from akhilgkrishnan/capitalize-framework-names
Capitalize framework names [skip ci]
2023-10-11 17:04:27 +02:00
Akhil G Krishnan
41e86d4286 Updated the rails version in 7.1 to 7.2 in guide [skip ci] 2023-10-11 20:26:23 +05:30
Eileen M. Uchitelle
bfd981ebb4
Merge pull request #49539 from akhilgkrishnan/docs-update-7-0-to-7-1
Updated the rails version in 7.0 to 7.1 in guide [skip ci]
2023-10-11 10:17:44 -04:00
Akhil G Krishnan
72fae17f92 Updated the rails version in 7.0 to 7.1 in guide [skip ci] 2023-10-11 19:45:22 +05:30
Ryuta Kamizono
7514031eeb
Merge pull request #49582 from fatkodima/enable-RedundantDoubleSplatHashBraces-cop
Enable `Style/RedundantDoubleSplatHashBraces` rubocop cop
2023-10-11 22:39:55 +09:00
Adrianna Chang
3064a255c5
Merge pull request #49581 from hachi8833/update_doc_npm
[ci-skip][Docs]Update guide: NPM -> npm
2023-10-11 14:57:05 +02:00
fatkodima
b8829cabec Enable Style/RedundantDoubleSplatHashBraces rubocop cop 2023-10-11 14:55:00 +03:00
hachi8833
0df2c25479 Update guide: NPM -> npm 2023-10-11 19:07:50 +09:00
Petrik de Heus
174ab6c342
Merge pull request #49577 from sedubois/patch-1
[ci skip] Explain how to configure collection cache key
2023-10-11 11:50:12 +02:00
Petrik
79f5588d33 Recommend fixed-width fonts for HTML and CSS as well in docs [ci-skip] 2023-10-11 11:20:11 +02:00
Ryuta Kamizono
e8cad01402
Merge pull request #49576 from fatkodima/fix-number-helper-to_d
`NumberHelper`: handle objects responding `to_d`
2023-10-11 17:46:33 +09:00
Sébastien Dubois
6eeb128e60 Explain how to configure collection cache key 2023-10-11 09:54:54 +02:00
Jonathan Hefner
8776e951f2
Merge pull request #49556 from mguan2020/my_new_branch
Fixed formatting in Action Text documentation to make it more consistent. [ci skip]
2023-10-10 23:06:26 -05:00
Akhil G Krishnan
af1c06584e
Merge branch 'rails:main' into main 2023-10-11 09:19:28 +05:30
John Bampton
7ee9306bb7 guides/source/asset_pipeline.md: change Javascript to JavaScript 2023-10-11 09:18:36 +05:30
Thomas Countz
b4c01fa3a7 Fix RedisCacheStore INCR/DECR for Redis < v7.0.0
This commit fixes a discrepancy in the behavior of the `#increment` and
`#decrement` methods in `RedisCacheStore` when used with Redis versions less
than 7.0.0. The existing condition `count != amount` prevented setting the
Time-To-Live (TTL) for keys that were equal to the increment/decrement amount
after the `INCRBY`/`DECRBY` operation. This occurs when incrementing a
non-existent key by `1`, for example.

Using Redis pipelining, we minimize the network overhead incurred by checking
for existing TTLs. It decouples the TTL operations from the increment/decrement
operation, allowing the TTL to be set correctly regardless of the resulting
value from the `INCRBY`/`DECRBY`.

New tests have been added to verify the correct behavior of `#increment` and
`#decrement` methods, specifically when the `expires_in` option is not used.
Using a separate cache store instance (`@cache_no_ttl`), these tests ensure that
keys are correctly incremented or decremented and that their TTL remains unset.

Co-authored-by: Benjamin Quorning <benjamin@quorning.net>
Co-authored-by: Jury Razumau <jury.razumau@zendesk.com>
Co-authored-by: Edyta Rozczypała <edyta.rozczypala@zendesk.com>
2023-10-11 09:18:36 +05:30
John Bampton
bc41113fc9 guides/source/configuring.md: fix grammar and spelling 2023-10-11 09:18:36 +05:30
Jenny Shen
b742d88b6c Add support for kwargs when delegating calls to custom loggers
Currently, when a method is called on Rails.logger, the BroadcastLogger will find the loggers that will respond to that method. However, when the method has keyword arguments, they are passed as regular arguments and will throw an ArgumentError. This adds keyword argument support by double splatting hash args.

```
class CustomLogger
  def foo(bar:)
    true
  end
end

Rails.logger.foo(bar: "baz")
```

Expected: `true`

Actual: `wrong number of arguments (given 1, expected 0) (ArgumentError)`
2023-10-11 09:18:36 +05:30
Akhil G Krishnan
cf61804fd4 Update postgres naming to PostgreSQL 2023-10-11 09:18:36 +05:30
Ryunosuke Sato
8bf0486899 [Refactor] Remove unused from tests for @rails/ujs 2023-10-11 09:18:36 +05:30
Hieu Nguyen
ab06e13db4 SQLite - Remove quote when extracting table ref in insert query 2023-10-11 09:18:36 +05:30
fatkodima
fe3b07f683 NumberHelper: handle objects responding to_d 2023-10-11 01:38:21 +03:00
Jonathan Hefner
8ab5e58272
Merge pull request #49575 from jbampton/fix-case-of-javascript
guides/source/asset_pipeline.md: change `Javascript` to `JavaScript` [ci-skip]
2023-10-10 17:36:47 -05:00
Jean Boussier
d4172bd44f
Merge pull request #49554 from Thomascountz/fix-redis-lt7-ttl-not-set-on-first-incr-decr
Fix `RedisCacheStore` INCR/DECR for Redis < v7.0.0
2023-10-11 00:15:16 +02:00
John Bampton
10bd1d8d23 guides/source/asset_pipeline.md: change Javascript to JavaScript 2023-10-11 08:13:16 +10:00
Jonathan Hefner
c8149e6c57
Merge pull request #49573 from jbampton/fix-spelling
guides/source/configuring.md: fix grammar and spelling [ci-skip]
2023-10-10 16:28:47 -05:00
Eileen M. Uchitelle
d3ee0200b2
Merge pull request #49571 from jenshenny/kwargs-broadcast-logger
Add support for kwargs when delegating calls to custom loggers
2023-10-10 17:11:00 -04:00
John Bampton
ecac7d6d4e guides/source/configuring.md: fix grammar and spelling 2023-10-11 07:04:34 +10:00
Jenny Shen
6070685cf9
Add support for kwargs when delegating calls to custom loggers
Currently, when a method is called on Rails.logger, the BroadcastLogger will find the loggers that will respond to that method. However, when the method has keyword arguments, they are passed as regular arguments and will throw an ArgumentError. This adds keyword argument support by double splatting hash args.

```
class CustomLogger
  def foo(bar:)
    true
  end
end

Rails.logger.foo(bar: "baz")
```

Expected: `true`

Actual: `wrong number of arguments (given 1, expected 0) (ArgumentError)`
2023-10-10 21:43:13 +01:00
Thomas Countz
600a052c8c Fix RedisCacheStore INCR/DECR for Redis < v7.0.0
This commit fixes a discrepancy in the behavior of the `#increment` and
`#decrement` methods in `RedisCacheStore` when used with Redis versions less
than 7.0.0. The existing condition `count != amount` prevented setting the
Time-To-Live (TTL) for keys that were equal to the increment/decrement amount
after the `INCRBY`/`DECRBY` operation. This occurs when incrementing a
non-existent key by `1`, for example.

Using Redis pipelining, we minimize the network overhead incurred by checking
for existing TTLs. It decouples the TTL operations from the increment/decrement
operation, allowing the TTL to be set correctly regardless of the resulting
value from the `INCRBY`/`DECRBY`.

New tests have been added to verify the correct behavior of `#increment` and
`#decrement` methods, specifically when the `expires_in` option is not used.
Using a separate cache store instance (`@cache_no_ttl`), these tests ensure that
keys are correctly incremented or decremented and that their TTL remains unset.

Co-authored-by: Benjamin Quorning <benjamin@quorning.net>
Co-authored-by: Jury Razumau <jury.razumau@zendesk.com>
Co-authored-by: Edyta Rozczypała <edyta.rozczypala@zendesk.com>
2023-10-10 19:32:26 +00:00
Carlos Antonio da Silva
c7e3cf2561
Merge pull request #49562 from akhilgkrishnan/update-postgres-naming-to-postgresql
Update postgres naming to PostgreSQL
2023-10-10 15:51:45 -03:00
Carlos Antonio da Silva
d2fd7920dc
Merge pull request #49568 from tricknotes/cleanup-ujs-test
[Refactor] Remove unused from tests for `@rails/ujs`
2023-10-10 15:44:34 -03:00
Ryunosuke Sato
7365897530 [Refactor] Remove unused from tests for @rails/ujs 2023-10-11 01:14:33 +09:00
Jean Boussier
ce2eb72667
Merge pull request #49544 from hieuk09/bug/fix-sqlite3-table-name-quote
SQLite: add additional quote to table name only when it’s not quoted
2023-10-10 17:40:12 +02:00