<commit_before># workaround for plugins' scope problem
require_dependency 'suppliers_plugin/product_helper'

class SuppliersPluginProductController < MyProfileController

  helper SuppliersPlugin::ProductHelper

  def index
    @supplier = SuppliersPlugin::Supplier.find_by_id params[:supplier_id]
    not_distributed_products

    @products = @node.products.unarchived.distributed.paginate({
      :per_page => 10, :page => params[:page],
      }.merge(search_scope.proxy_options))
    @all_products_count = @node.products.unarchived.distributed.count
    @product_categories = ProductCategory.find(:all)
    @new_product = SuppliersPlugin::DistributedProduct.new :profile => profile, :supplier => @supplier

    respond_to do |format|
      format.html
      format.js { render :partial => 'suppliers_plugin_product/search' }
    end
  end

  def edit
    @product = SuppliersPlugin::DistributedProduct.find params[:id]
    @product.update_attributes params[:product]
  end

  def destroy
    @product = SuppliersPlugin::BaseProduct.find params[:id]
    if @product.nil?
      flash[:notice] = t('suppliers_plugin.controllers.myprofile.product_controller.the_product_was_not_r')
      false
    else
      @product.archive and flash[:notice] = t('suppliers_plugin.controllers.myprofile.product_controller.product_removed_succe')
    end
  end
<commit_msg>Fix params not being passed error<commit_after># workaround for plugins' scope problem
require_dependency 'suppliers_plugin/product_helper'

class SuppliersPluginProductController < MyProfileController

  helper SuppliersPlugin::ProductHelper

  def index
    @supplier = SuppliersPlugin::Supplier.find_by_id params[:supplier_id] unless params[:supplier_id].blank?
    not_distributed_products

    @products = @node.products.unarchived.distributed.paginate({
      :per_page => 10, :page => params[:page],
      }.merge(search_scope.proxy_options))
    @all_products_count = @node.products.unarchived.distributed.count
    @product_categories = ProductCategory.find(:all)
    @new_product = SuppliersPlugin::DistributedProduct.new :profile => profile, :supplier => @supplier

    respond_to do |format|
      format.html
      format.js { render :partial => 'suppliers_plugin_product/search' }
    end
  end

  def edit
    @product = SuppliersPlugin::DistributedProduct.find params[:id]
    @product.update_attributes params[:product]
  end

  def destroy
    @product = SuppliersPlugin::BaseProduct.find params[:id]
    if @product.nil?
      flash[:notice] = t('suppliers_plugin.controllers.myprofile.product_controller.the_product_was_not_r')
      false
    else
      @product.archive and flash[:notice] = t('suppliers_plugin.controllers.myprofile.product_controller.product_removed_succe')
    end
  end

{'fraction_non_alphanumeric': 0.09786926688335139, 'fraction_numerical': 0.001444564824846515, 'mean_word_length': 4.734989648033126, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, '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': '7490513', 'n_tokens_mistral': 820, 'n_tokens_neox': 791, 'n_words': 149}