Class: Specify::Model::Collection

Inherits:
Object
  • Object
show all
Defined in:
lib/specify/models/collection.rb

Instance Method Summary collapse

Instance Method Details

#before_saveObject



30
31
32
33
34
# File 'lib/specify/models/collection.rb', line 30

def before_save
  self.Version += 1
  self.TimestampModified = Time.now
  super
end

#highest_catalog_numberObject



48
49
50
# File 'lib/specify/models/collection.rb', line 48

def highest_catalog_number
  collection_objects_dataset.max(:CatalogNumber)
end

#inspectObject

Returns a string containing a human-readable representation.



37
38
39
# File 'lib/specify/models/collection.rb', line 37

def inspect
  "#{self} name: #{self.CollectionName}"
end

#view_set(_collection = nil) ⇒ Object

Returns the ViewSetObject. The argument is only for ducktyping/overloading.



43
44
45
# File 'lib/specify/models/collection.rb', line 43

def view_set(_collection = nil)
  view_set_dir&.view_set_object
end