My code is the below.
mails_preview.rb
summaries = ["testntestntestntest", "testntestntestntest"]
ClientsMailer.test(summaries)
clients_mailer.rb
class ClientsMailer < ApplicationMailer
def test(summaries)
@summaries = summaries
mail(
to: "[email protected],
subject: "test",
)
end
end
test.slim
= @summaries.map { |summary| summary }.join("n")
Output is here
test test test test test test test test
n doesn’t work for making a new line.
I can’t understand why.
Do you have any ideas?