Orbit/app/models/design/design_file.rb

18 lines
237 B
Ruby

class DesignFile
include Mongoid::Document
include Mongoid::Timestamps
mount_uploader :file, AssetUploader
field :name
before_save :set_name
protected
def set_name
self.name = self.file_identifier
end
end