class AlternateNetworkLogo < ApplicationRecord
  belongs_to :employer

  # before_save :process_network_logo

  def process_network_logo
    if self.network_logo.present? && !self.network_logo.is_a?(String)
      self.employer_setup_process.card_logo_files.new(
        filename: self.network_logo.filename, 
        logo_type: 'network',
        image: self.network_logo.data,
        pl_plan_key: self.employer_setup_process.pl_plan_key || ""
      )
    end
  end
end