<commit_before>module Spree
  module Admin
    class TireSettingsController < Spree::Admin::BaseController
      def search_tyre
        tyre = params[:tyre]
        @searcher = Spree::Config.searcher_class.new(params.merge(:keywords => tyre))
        @products = @searcher.retrieve_products

        respond_to do |format|
          format.js
        end
      end

      def upload_file
        productos = params[:product_ids]
        imagen = params[:image]
        type = imagen.split(".").last
        for product in productos
          t = Spree::Product.find(product)
          i = Spree::Image.new
          i.attachment = imagen
          i.viewable = t.master
          i.save
        end

      end

      def load_massive_images

      end
    end
  end
end<commit_msg>Mas mejoras<commit_after>module Spree
  module Admin
    class TireSettingsController < Spree::Admin::BaseController
      def search_tyre
        tyre = params[:tyre]
        @searcher = Spree::Config.searcher_class.new(params.merge(:keywords => tyre))
        @products = @searcher.retrieve_products

        respond_to do |format|
          format.js
        end
      end

      def upload_file
        productos = params[:product_ids]
        imagen = params[:image]
        type = imagen.split(".").last
        for product in productos
          t = Spree::Product.find(product)
          i = Spree::Image.new
          i.attachment = imagen
          i.viewable = t.master
          i.save
        end
        redirect_to load_massive_images_admin_tire_settings_url
      end

      def load_massive_images

      end
    end
  end
end
{'fraction_non_alphanumeric': 0.08, 'fraction_numerical': 0.0, 'mean_word_length': 1.9617486338797814, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '4935942', 'n_tokens_mistral': 483, 'n_tokens_neox': 474, 'n_words': 104}