@tomhughes commented on this pull request.

Looks great to me!

> +class UserMailerPreview < ActionMailer::Preview
+  include FactoryBot::Syntax::Methods
+
+  # Wraps the preview in a transaction, so that no changes
+  # are persisted to the development db
+  def self.call(...)
+    preview = nil
+    ActiveRecord::Base.transaction do
+      preview = super(...)
+      raise ActiveRecord::Rollback
+    end
+    preview
+  end
+
+  def diary_comment_notification
+    recipient = create(:user)

This should probably set the user language so that the local selector in the 
preview works - something like:

```suggestion
    recipient = create(:user, :languages => [I18n.locale])
```

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6449#pullrequestreview-3341932718
You are receiving this because you are subscribed to this thread.

Message ID: 
<openstreetmap/openstreetmap-website/pull/6449/review/[email protected]>
_______________________________________________
rails-dev mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/rails-dev

Reply via email to