<commit_before>class Notifications < ActionMailer::Base
  include PodsHelper
  
  default from: '<EMAIL>', bcc: '<EMAIL>'
  
  def welcome(user)
    @greeting = "Hi #{user.name},"
    @gift_code = user.subscriptions.active.gift_code.present?
    mail to: user.email
  end

  def gift_code_welcome(user)
    @greeting = "Hi #{user.name},"
    mail to: user.email
  end

  def shipped(user)
    @greeting = "Hi #{user.name},"
    mail to: user.email
  end

  def gift_code_receipt_without_recipient(code)
    @code = code.code
    @months = code.months
    @price = price_string(code.months)
    @purchaser_name = code.purchaser_name
    mail to: code.purchaser_email
  end
  
  def gift_code_receipt_with_recipient(code)
    @months = code.months
    @price = price_string(code.months)
    @recipient_name = code.recipient_name
    @recipient_email = code.recipient_email
    @send_date = code.send_date
    @purchaser_name = code.purchaser_name
    mail to: code.purchaser_email
  end

  def gift_code(code)
    @code = code.code<commit_msg>take all code options into account for price string creation<commit_after>class Notifications < ActionMailer::Base
  include PodsHelper
  
  default from: '<EMAIL>', bcc: '<EMAIL>'
  
  def welcome(user)
    @greeting = "Hi #{user.name},"
    @gift_code = user.subscriptions.active.gift_code.present?
    mail to: user.email
  end

  def gift_code_welcome(user)
    @greeting = "Hi #{user.name},"
    mail to: user.email
  end

  def shipped(user)
    @greeting = "Hi #{user.name},"
    mail to: user.email
  end

  def gift_code_receipt_without_recipient(code)
    @code = code.code
    @months = code.months
    @price = price_string(code.months, code.organic, code.size)
    @purchaser_name = code.purchaser_name
    mail to: code.purchaser_email
  end
  
  def gift_code_receipt_with_recipient(code)
    @months = code.months
    @price = price_string(code.months, code.organic, code.size)
    @recipient_name = code.recipient_name
    @recipient_email = code.recipient_email
    @send_date = code.send_date
    @purchaser_name = code.purchaser_name
    mail to: code.purchaser_email
  end

  def gift_code(code)
    @code = code.code
{'fraction_non_alphanumeric': 0.10463515374024782, 'fraction_numerical': 0.0, 'mean_word_length': 3.5228215767634854, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6410045', 'n_tokens_mistral': 806, 'n_tokens_neox': 775, 'n_words': 162}