module VestalVersions::Tagging::VersionMethods

Instance methods included into VestalVersions::Version to enable version tagging.

Public Instance Methods

tag!(tag) click to toggle source

Attaches the given string to the version tag column. If the uniqueness validation fails, nil is returned. Otherwise, the given string is returned.

# File lib/vestal_versions/tagging.rb, line 39
def tag!(tag)
  write_attribute(:tag, tag)
  save ? tag : nil
end
tagged?() click to toggle source

Simply returns a boolean signifying whether the version instance has a tag value attached.

# File lib/vestal_versions/tagging.rb, line 45
def tagged?
  !tag.nil?
end