我想在每次交易後發送郵件給商店的所有者。其他一切都已建立,但我似乎無法獲得生成的電子郵件地址。貝寶郵差挑戰與導軌
class PaymentNotifier < ActionMailer::Base
def notify(payment_notification)
@payment_notification = payment_notification
mail to: **'xxxxxxxxx'**, subject: 'New order'
end
end
付款通知接觸到交易的詳細信息的系統: cart_id,LINE_ITEM_ID,PRODUCT_TITLE。
Line_item有一個cart_id列和一個product_id列。
產品具有store_id列。
商店有一個user_id列。
用戶有一個電子郵件地址。
試圖找出我如何從我的郵件中訪問此電子郵件地址,並在交易後觸發電子郵件。
任何幫助,將不勝感激。
提前致謝!
您使用的設計? – Sravan
@Sravan是的,我是。爲什麼? –