flash[:notice]
文字列の配列と単一の文字列に (2 つの異なる時間で)渡したい
例:
multi_lines << "Product: #{product.title} disponibile in #{product_quantity}<br/>"
multi_lines << "Product: #{product.title} disponibile in #{product_quantity}<br/>"
notice: multi_lines
と
single_text = "Hello"
notice: single_text
私の見解では、次のコードがあります。
<% if notice %>
<p id= "notice"><%= notice.join("<br/>").html_safe %></p>
<% end %>
もちろん、単一の文字列を渡すと、Rails は結合メソッドが String クラスに存在しないと言います。どのようにエラーを乗り越えることができますか?
ありがとう