Skip to content

Commit

Permalink
Remove ActiveStorage's deprecated configs
Browse files Browse the repository at this point in the history
`config.active_storage.replace_on_assign_to_many` has been removed at b06252e
and `config.active_storage.silence_invalid_content_types_warning` at 0cf8444.

Also in the upgrade guide the versions these configs were deprecated and removed were not accurate
so corrected them accordingly.
  • Loading branch information
sato11 committed Jul 21, 2024
1 parent e0a9ef1 commit 4a42fcc
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
9 changes: 0 additions & 9 deletions activestorage/lib/active_storage/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,6 @@ class Engine < Rails::Engine # :nodoc:
ActiveStorage.content_types_allowed_inline = app.config.active_storage.content_types_allowed_inline || []
ActiveStorage.binary_content_type = app.config.active_storage.binary_content_type || "application/octet-stream"
ActiveStorage.video_preview_arguments = app.config.active_storage.video_preview_arguments || "-y -vframes 1 -f image2"

unless app.config.active_storage.silence_invalid_content_types_warning.nil?
ActiveStorage.silence_invalid_content_types_warning = app.config.active_storage.silence_invalid_content_types_warning
end

unless app.config.active_storage.replace_on_assign_to_many.nil?
ActiveStorage.replace_on_assign_to_many = app.config.active_storage.replace_on_assign_to_many
end

ActiveStorage.track_variants = app.config.active_storage.track_variants || false
end
end
Expand Down
2 changes: 1 addition & 1 deletion guides/source/upgrading_ruby_on_rails.md
Original file line number Diff line number Diff line change
Expand Up @@ -1326,7 +1326,7 @@ user.highlights.first.filename # => "funky.jpg"
user.highlights.second.filename # => "town.jpg"
```

Existing applications can opt in to this new behavior by setting [`config.active_storage.replace_on_assign_to_many`][] to `true`. The old behavior will be deprecated in Rails 7.0 and removed in Rails 7.1.
Existing applications can opt in to this new behavior by setting [`config.active_storage.replace_on_assign_to_many`][] to `true`. The old behavior was deprecated in Rails 7.1 and removed in Rails 7.2.

[`config.active_storage.replace_on_assign_to_many`]: configuring.html#config-active-storage-replace-on-assign-to-many

Expand Down

0 comments on commit 4a42fcc

Please sign in to comment.