Sha256: e47a63739687540c4052c7558c4718d6759bc27270b921dec0eccd23ad88bd0e

Contents?: true

Size: 502 Bytes

Versions: 2

Compression:

Stored size: 502 Bytes

Contents

module AnnotatorStore
  class Annotation < ActiveRecord::Base
    # Associations
    has_many :ranges, dependent: :destroy, autosave: true

    # Allow saving of attributes on associated records through the parent,
    # :autosave option is automatically enabled on every association
    accepts_nested_attributes_for :ranges

    # Validations
    validates :version, presence: true
    validates :text, presence: true
    validates :quote, presence: true
    validates :uri, presence: true
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
annotator_store-1.0.0 app/models/annotator_store/annotation.rb
annotator_store-1.0.0.pre app/models/annotator_store/annotation.rb