Sha256: 7e7f851a993e0bd7315106a9344ddf0aa210fc799a870b6ff57683e2552690f8

Contents?: true

Size: 408 Bytes

Versions: 2

Compression:

Stored size: 408 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 versionable_changes
      ChangeTracker.new(self)
    end

    def parent
      version
    end

    def is_a_child?
      true
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
controlled_versioning-0.9.1 app/models/controlled_versioning/version_child.rb
controlled_versioning-0.9.0 app/models/controlled_versioning/version_child.rb