Quantcast
Channel: Active questions tagged ruby - Stack Overflow
Viewing all articles
Browse latest Browse all 4610

Can't make a new line in slim template

$
0
0

My code is the below.

mails_preview.rbsummaries = ["test\ntest\ntest\ntest", "test\ntest\ntest\ntest"]ClientsMailer.test(summaries)
clients_mailer.rbclass ClientsMailer < ApplicationMailer  def test(summaries)    @summaries = summaries    mail(      to: "test@test.com,      subject: "test",    )  endend
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?


Viewing all articles
Browse latest Browse all 4610

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>