Sha256: 8611167d1f94aa8987a8f094aa24260e6e5cbf2ef1f1386c25c2736abbaae0ef

Contents?: true

Size: 385 Bytes

Versions: 13

Compression:

Stored size: 385 Bytes

Contents

module Helena
  class Label
    include Helena::Concerns::ApplicationModel
    include Mongoid::Orderable

    field :text,        type: String
    field :value,       type: String
    field :preselected, type: Boolean, default: false

    embedded_in :question, inverse_of: :labels

    orderable

    validates :value, presence: true
    validates :value, uniqueness: true
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
helena-2.1.0 app/models/helena/label.rb
helena-2.0.2 app/models/helena/label.rb
helena-2.0.1 app/models/helena/label.rb
helena-2.0.0 app/models/helena/label.rb
helena-1.3.1 app/models/helena/label.rb
helena-1.3.0 app/models/helena/label.rb
helena-1.1.0 app/models/helena/label.rb
helena-1.0.3 app/models/helena/label.rb
helena-1.0.2 app/models/helena/label.rb
helena-1.0.1 app/models/helena/label.rb
helena-1.0.0.rc4 app/models/helena/label.rb
helena-1.0.0.rc3 app/models/helena/label.rb
helena-1.0.0.rc2 app/models/helena/label.rb