rails-guide-store/app/mailers/product_mailer.rb

12 lines
282 B
Ruby
Raw Permalink Normal View History

2025-01-24 19:11:47 +00:00
class ProductMailer < ApplicationMailer
# Subject can be set in your I18n file at config/locales/en.yml
# with the following lookup:
#
# en.product_mailer.in_stock.subject
#
def in_stock
@product = params[:product]
mail to: params[:subscriber].email
end
end