<commit_before>module Glysellin
  module ProductsHelper
    def variants_options_for sellable
      # Prepare ou arguments arrays
      all_variants, disabled_variants = [], []
      # Iterate on each variant to find which are enabled and disabled
      sellable.published_variants.each do |variant|
        next unless variant.published?
        if variant.in_stock?
          name = variant.name
        else
          disabled_variants << variant.id
          name = variant.name +
            " (#{ t('glysellin.labels.sellables.out_of_stock') })"
        end

        all_variants << [name, variant.id]
      end

      options_for_select(all_variants, disabled: disabled_variants)
    end
  end
end
<commit_msg>Added: current_stock<commit_after>module Glysellin
  module ProductsHelper
    def variants_options_for sellable
      # Prepare ou arguments arrays
      all_variants, disabled_variants = [], []
      # Iterate on each variant to find which are enabled and disabled
      sellable.published_variants.each do |variant|
        next unless variant.published?
        if current_store.in_stock?(variant)
          name = variant.name
        else
          disabled_variants << variant.id
          name = variant.name +
            " (#{ t('glysellin.labels.sellables.out_of_stock') })"
        end

        all_variants << [name, variant.id]
      end

      options_for_select(all_variants, disabled: disabled_variants)
    end
  end
end

{'fraction_non_alphanumeric': 0.07348901098901099, 'fraction_numerical': 0.0, 'mean_word_length': 2.5024038461538463, 'pattern_counts': {'":': 0, '<': 11, '<?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': '1200621', 'n_tokens_mistral': 417, 'n_tokens_neox': 403, 'n_words': 103}