Hello everyone, I'm doing a kind of cloning of the...
# support
s
Hello everyone, I'm doing a kind of cloning of the "product feature" (model, controller, helper, admin panel, ...) I also would like to generalize the search helper
Spree::Core::Search::Base
and
Spree::Core::ControllerHelpers::Search
for searching not only for the Product model
Copy code
module SearchDecorator
  class Base
  end
   
  class Product
    #something
  end
   
  class Other
    #something
  end

  ::Spree::Core::Search.prepend self
end
Copy code
module BuidlSearchHelperDecorator
  module Product
    def build_searcher(params)
      #something
    end
  end
  
  module Other
    def build_searcher(params)
      #something
    end
  end
  
  def build_searcher(params)
  end

  ::Spree::Core::ControllerHelpers::Search.prepend self
end
There is the code I wrote in
/app/overrides
I was wondering if this is the right approach ------ Solidus 3.2.0
k
I think it might work!
👍 1
s
@kennyadsl thanks for your return 😉