Sha256: 72b8554ed3b6daf82d0986c129c013527b541a7cff49d76ac9b0607df495dea8

Contents?: true

Size: 1.25 KB

Versions: 4

Compression:

Stored size: 1.25 KB

Contents

# frozen_string_literal: true

class Spree::ReviewsConfiguration < Spree::Preferences::Configuration
  def self.boolean_preferences
    %w(display_unapproved_reviews include_unapproved_reviews feedback_rating show_email require_login track_locale)
  end

  # include non-approved reviews in (public) listings
  preference :include_unapproved_reviews, :boolean, default: false

  # displays non-approved reviews in (public) listings
  preference :display_unapproved_reviews, :boolean, default: false

  # control how many reviews are shown in summaries etc.
  preference :preview_size, :integer, default: 3

  # show a reviewer's email address
  preference :show_email, :boolean, default: false

  # show if a reviewer actually purchased the product
  preference :show_verified_purchaser, :boolean, default: false

  # show helpfullness rating form elements
  preference :feedback_rating, :boolean, default: false

  # require login to post reviews
  preference :require_login, :boolean, default: true

  # whether to keep track of the reviewer's locale
  preference :track_locale, :boolean, default: false

  # render checkbox for a user to approve to show their identifier (name or email) on their review
  preference :render_show_identifier_checkbox, :boolean, default: false
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
solidus_reviews-1.3.0 app/models/spree/reviews_configuration.rb
solidus_reviews-1.2.0 app/models/spree/reviews_configuration.rb
solidus_reviews-1.1.1 app/models/spree/reviews_configuration.rb
solidus_reviews-1.1.0 app/models/spree/reviews_configuration.rb