Sha256: 1e038689c0e003103821428261fa8c78b0e90650182e9eaa6766fdfc0b60ed0f
Contents?: true
Size: 472 Bytes
Versions: 2
Compression:
Stored size: 472 Bytes
Contents
class ControlledVersioning::Version < ActiveRecord::Base belongs_to :versionable, polymorphic: true belongs_to :user has_many :version_attributes, as: :version has_many :version_children, as: :version validates :versionable, presence: true def accept Revision::Publisher.new(self).accept_revision unless initial? update_attributes(pending: false, accepted: true) end def decline update_attributes(pending: false, declined: true) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
controlled_versioning-0.6.3 | lib/generators/templates/version.rb |
controlled_versioning-0.6.2 | lib/generators/templates/version.rb |