From 65e4a640843bf3edafd0e52fcddb72283b1ba9ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Sun, 14 Apr 2024 21:22:32 +0200 Subject: [PATCH] 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 --- config/environments/development.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/environments/development.rb b/config/environments/development.rb index 4076490b5..4cc59fe36 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -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