Sha256: bc3b2087ed3df9a4c0ca24f608737da7dbb0c8e72250f8a87880296574655806

Contents?: true

Size: 364 Bytes

Versions: 3

Compression:

Stored size: 364 Bytes

Contents

module Workarea
  module Storefront
    module ContentSearchResults
      def multiple_result_types?
        product_total > 0 && content_total > 0
      end

      def product_total
        model.total
      end

      def result_type
        if model.template == 'content'
          'content'
        else
          super
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
workarea-content_search-1.1.0 app/view_models/workarea/storefront/content_search_results.rb
workarea-content_search-1.0.9 app/view_models/workarea/storefront/content_search_results.rb
workarea-content_search-1.0.8 app/view_models/workarea/storefront/content_search_results.rb