app/mailers/email_subscription_mailer.rb
# Subject can be set in your I18n file at config/locales/en.yml
# with the following lookup:
#
#   en.email_subscription_mailer.daily_email.subject
#
Subject can be set in your I18n file at config/locales/en.yml
with the following lookup.


Subject can be set in your I18n file at config / locales / en . yml with the following lookup .
def daily_email(email_subscription)
    @email_subscription = email_subscription
    @unsubscribe_url = "http://sheltered-stream-93214.herokuapp.com/#/main/email_subscrition?email=#{email_subscription.email}"
    available_ons = Dish::AvailableOn.where(delivery_date: Date.today)
    product_ids = available_ons.pluck(:product_id)
    @products = Spree::Product.where(id: product_ids)
    mail to: email_subscription.email, subject: "Daily dishes"
  end
def daily_email ( email_subscription ) @email_subscription = email_subscription @unsubscribe_url = "http://sheltered-stream-93214.herokuapp.com/#/main/email_subscrition?email=#{email_subscription.email}" available_ons = Dish :: AvailableOn . where ( delivery_date : Date . today ) product_ids = available_ons . pluck ( :product_id ) @products = Spree :: Product . where ( id : product_ids ) mail to : email_subscription . email , subject : "Daily dishes" end
Subject can be set in your I18n file at config/locales/en.yml
with the following lookup:
Subject can be set in your I18n file at config / locales / en . yml with the following lookup :
email_subscription