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.
orbit-4-1/app/models/design/design_file.rb

18 lines
237 B
Ruby
Raw Permalink 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