【发布时间】:2017-06-01 01:36:43
【问题描述】:
我正在学习 rails 并创建一个 confirmation.text.erb 以从我的示例应用程序发送文本通知。如下所示:
Hi <%= @user_detail.outputs[0][0] %>, We noticed you havent paid your cable bill. you total remaining is <%= @user_detail.outputs[0][1] %>. You can pay bill online or visit the nearest cable center.
但是当我的手机收到短信时,我只看到Hi <%= @user_detail.outputs[0][0] %>, We noticed you havent paid your abc bill. you total remaining 部分。为什么它不发送完整的文本?
UserMailer 如下所示
class UserMailer < ApplicationMailer
def payment_confirmation(user_detail)
@user_detail = user_detail
mail from: "no-reply@cerner.com",
to: '1112223333@messaging.sprintpcs.com',
subject: 'Payment notification'
end
end
谢谢
【问题讨论】:
-
邮件方法是什么样的?
-
使用邮件方法更新问题
-
现在,
user_detail是什么样的? :) -
#<:response:0x007fe6d5897a38>>
标签: html ruby-on-rails ruby-on-rails-4 erb