Use preview_paths instead of preview_path
We were getting a deprecation warning in the logs after upgrading to Rails 7.1: ``` DEPRECATION WARNING: Using preview_path= option is deprecated and will be removed in Rails 7.2. Please use preview_paths= instead. ``` So we're appending a path to the `preview_paths`, as recommended in the guide to upgrade to Rails 7.1 [1]. [1] https://guides.rubyonrails.org/v7.1/upgrading_ruby_on_rails.html#support-multiple-preview-paths-for-actionmailer-preview
This commit is contained in:
@@ -74,7 +74,7 @@ Rails.application.configure do
|
||||
# config.action_view.annotate_rendered_view_with_filenames = true
|
||||
|
||||
config.eager_load_paths << "#{Rails.root}/spec/mailers/previews"
|
||||
config.action_mailer.preview_path = "#{Rails.root}/spec/mailers/previews"
|
||||
config.action_mailer.preview_paths << "#{Rails.root}/spec/mailers/previews"
|
||||
|
||||
# Limit size of local logs
|
||||
# TODO: replace with config.log_file_size after upgrading to Rails 7.1
|
||||
|
||||
Reference in New Issue
Block a user