Sha256: adcaaf1b96a3dbb3cdfcbd5a5e97a9d4598cbc2c7ecdbe0b7dc8745d4ace2eb7
Contents?: true
Size: 675 Bytes
Versions: 3
Compression:
Stored size: 675 Bytes
Contents
class Spree::FeedbackReview < ActiveRecord::Base belongs_to :user, :class_name => Spree.user_class.to_s belongs_to :review, dependent: :destroy validates :review, presence: true validates :rating, numericality: { only_integer: true, greater_than_or_equal_to: 1, less_than_or_equal_to: 5, message: Spree.t('you_must_enter_value_for_rating') } scope :most_recent_first, -> { order("spree_feedback_reviews.created_at DESC") } default_scope { most_recent_first } scope :localized, lambda { |lc| where('spree_feedback_reviews.locale = ?', lc) } end
Version data entries
3 entries across 3 versions & 2 rubygems