Class: Helena::Survey

Inherits:
Object
  • Object
show all
Includes:
Concerns::ApplicationModel, Mongoid::Document::Taggable, Mongoid::Orderable
Defined in:
app/models/helena/survey.rb

Instance Method Summary collapse

Instance Method Details

#newest_versionObject



20
21
22
# File 'app/models/helena/survey.rb', line 20

def newest_version
  versions.find_by version: versions.max(:version) if versions.any?
end