<commit_before>Spree::ProductsController.class_eval do
  respond_override :index => {
    :html => {
      :success => lambda do
        @products.sort!{|a,b| b.available_on <=> a.available_on rescue nil }
        render 'spree/products/index.html.erb'
      end
    }
  }
end<commit_msg>Include product assemblies in product list.<commit_after>Spree::ProductsController.class_eval do
  respond_override :index => {
    :html => {
      :success => lambda do
        @products.all
        if defined? Spree::AssembliesPart == 'constant'
          @assemblies = Spree::AssembliesPart.all.map(&:assembly).uniq.select{|a| a.on_hand > 0 }
        else
          @assemblies = []
        end
        @products = (@products.all + @assemblies).uniq.sort{|a,b| b.available_on <=> a.available_on rescue nil }
        render 'spree/products/index.html.erb'
      end
    }
  }
end
{'fraction_non_alphanumeric': 0.13218390804597702, 'fraction_numerical': 0.0011494252873563218, 'mean_word_length': 2.706382978723404, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 12, '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': '3426222', 'n_tokens_mistral': 287, 'n_tokens_neox': 278, 'n_words': 52}