module CategoryFilter
  extend ActiveSupport::Concern

  included do
    scope :all_category, where(type: name.to_s)
  end

  #  module ClassMethods
  #  	def filter_by_category(category_id)
		# product_"#{name}" = name.where(category_id: category_id)  		
  #  	end
  #  end
end