Sha256: b8b4d5721b837d7aa84252a279d47cd3eefb6246885d24ec1a01f2f26809e8da

Contents?: true

Size: 398 Bytes

Versions: 4

Compression:

Stored size: 398 Bytes

Contents

module ControlledVersioning
  class VersionChild < ActiveRecord::Base

    belongs_to :versionable, polymorphic: true
    belongs_to :version, polymorphic: true
    has_many :version_attributes, as: :version
    has_many :version_children, as: :version

    def revisions
      ChangeTracker.new(self)
    end

    def parent
      version
    end

    def is_a_child?
      true
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
controlled_versioning-0.12.0 app/models/controlled_versioning/version_child.rb
controlled_versioning-0.11.0 app/models/controlled_versioning/version_child.rb
controlled_versioning-0.10.0 app/models/controlled_versioning/version_child.rb
controlled_versioning-0.9.2 app/models/controlled_versioning/version_child.rb