This repository has been archived on 2024-03-16. You can view files and clone it, but cannot push or open issues or pull requests.
2011-07-12 08:02:41 +00:00
|
|
|
class DesignFile
|
|
|
|
include Mongoid::Document
|
2011-09-01 01:12:41 +00:00
|
|
|
include Mongoid::Timestamps
|
2011-07-12 08:02:41 +00:00
|
|
|
|
|
|
|
mount_uploader :file, AssetUploader
|
2011-07-14 00:48:42 +00:00
|
|
|
|
2012-10-24 10:40:38 +00:00
|
|
|
field :name
|
|
|
|
|
|
|
|
before_save :set_name
|
|
|
|
|
|
|
|
protected
|
|
|
|
|
|
|
|
def set_name
|
|
|
|
self.name = self.file_identifier
|
|
|
|
end
|
2011-07-12 08:02:41 +00:00
|
|
|
|
|
|
|
end
|