On a order mailer to find the order id i used order_id, but rails return a error, if i use params the same.
what's the way to get find the object id on a mailer?
def order_confirmation(order)
order = Order.find(order_id)
@user = order.buyer_id
mail(to: @user.email, subject: 'Confirmação da Compra', &:html)
end
Aucun commentaire:
Enregistrer un commentaire