我正在使用 ruby 2.0.0 这是我的控制器..
@mail_msg = @store_items.where(id: params[:button_id]).first.email_confirmation_text
p "-------------------------"
p @mail msg
p @mail_msg.html_safe
这是我的控制台(终端)输出
"-------------------------"
"<p>You have purchased Spice It Up. Points have been redeemed from your main account.</p>"
"<p>You have purchased Spice It Up. Points have been redeemed from your main account.</p>"
我在我的控制台中得到的是相同的。我无法逃脱 html 标签。
更新
我认为我有这个值..在我的视图页面中
<%= @mail_msg.html_safe %>
还是不行。。
请帮忙