Skip to content

Commit

Permalink
config action dispatch: migrate cookie serializer from :marshal to …
Browse files Browse the repository at this point in the history
…`:json`

GitHub: ref rangubaGH-7

In Rails v7, this setting defaults to `:json`.

Using `:marshal` as the default value was for backward compatibility with Rails v4.0.
We no longer need this default because we have been using the JSON format by overwriting it in `config/initializers/cookies_serializer.rb`.

In Ranguba, this change has no effect since we don't use cookies.

ref: rails/rails#42538
ref: https://guides.rubyonrails.org/configuring.html#config-action-dispatch-cookies-serializer
  • Loading branch information
otegami committed Jul 9, 2024
1 parent 3ade9b8 commit 2e7a7e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion config/initializers/new_framework_defaults_7_0.rb
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
# If you're upgrading and haven't set `cookies_serializer` previously, your cookie serializer
# is `:marshal`. The default for new apps is `:json`.
#
# Rails.application.config.action_dispatch.cookies_serializer = :json
Rails.application.config.action_dispatch.cookies_serializer = :json
#
#
# To migrate an existing application to the `:json` serializer, use the `:hybrid` option.
Expand Down

0 comments on commit 2e7a7e5

Please sign in to comment.