Orbit/app/models/design/design_file.rb

18 lines
237 B
Ruby
Raw Normal View History

class DesignFile
include Mongoid::Document
2011-09-01 01:12:41 +00:00
include Mongoid::Timestamps
mount_uploader :file, AssetUploader
2012-10-24 10:40:38 +00:00
field :name
before_save :set_name
protected
def set_name
self.name = self.file_identifier
end
end