Sha256: c5e7ead51e7b67938644d79d5f4b96a84c6e25aa2df8aff33feb84d0bd2b2503

Contents?: true

Size: 410 Bytes

Versions: 6

Compression:

Stored size: 410 Bytes

Contents

module Workarea
  decorate Catalog::Product, with: :reviews do
    decorated do
      # @!attribute total_reviews
      #   @return [Integer] the total number of approved reviews
      #
      field :total_reviews, type: Integer, default: 0

      # @!attribute average_rating
      #   @return [Float] the average rating of approved reviews
      #
      field :average_rating,  type: Float
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
workarea-reviews-3.1.2 app/models/workarea/catalog/product.decorator
workarea-reviews-3.1.1 app/models/workarea/catalog/product.decorator
workarea-reviews-3.1.0 app/models/workarea/catalog/product.decorator
workarea-reviews-3.0.10 app/models/workarea/catalog/product.decorator
workarea-reviews-3.0.9 app/models/workarea/catalog/product.decorator
workarea-reviews-3.0.8 app/models/workarea/catalog/product.decorator