Sha256: dd1c36828377762935a417e03d2f77719db22d7590b7fe20ab349d511a6e7ca8

Contents?: true

Size: 490 Bytes

Versions: 2

Compression:

Stored size: 490 Bytes

Contents

class Score < ActiveRecord::Base
  belongs_to :answer
  belongs_to :survey_property

  validates :value,    :presence => true
  validates :survey_property_id,  :presence => true,
                                  :uniqueness => {
                                          :scope    => :answer_id,
                                          :message  => "should have one score per property"
                                                 }
  #validates :answer_id,    :presence => true
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
survey_says-0.0.2 app/models/score.rb
survey_says-0.0.1 app/models/score.rb