<commit_before>if Spree.user_class
  Spree.user_class.class_eval do
    attr_accessible :subscribed

    after_create  :subscribe
    around_update :resubscribe
    after_destroy :unsubscribe
    after_initialize :assign_subscription_default, if: :new_record?

    delegate :subscribe, :resubscribe, :unsubscribe, to: :subscription

  private
    def subscription
      Spree::Chimpy::Subscription.new(self)
    end

    def assign_subscription_default
      self.subscribed = Spree::Chimpy::Config.preferred_default
    end
  end
end<commit_msg>Updates how the default value for subscribed is handled<commit_after>if Spree.user_class
  Spree.user_class.class_eval do
    attr_accessible :subscribed

    after_create  :subscribe
    around_update :resubscribe
    after_destroy :unsubscribe
    after_initialize :assign_subscription_default

    delegate :subscribe, :resubscribe, :unsubscribe, to: :subscription

  private
    def subscription
      Spree::Chimpy::Subscription.new(self)
    end

    def assign_subscription_default
      self.subscribed ||= Spree::Chimpy::Config.preferred_default if new_record?
    end
  end
end
{'fraction_non_alphanumeric': 0.06443071491615181, 'fraction_numerical': 0.0, 'mean_word_length': 4.274418604651163, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5505747', 'n_tokens_mistral': 339, 'n_tokens_neox': 336, 'n_words': 75}