orbit-4-2/app/models/design/design_file.rb

18 lines
237 B
Ruby
Raw Permalink Normal View History

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