Module: Gluttonberg::Library::Storage::Filesystem::ClassMethods
- Defined in:
- lib/gluttonberg/library/storage/filesystem.rb
Class Method Summary collapse
-
.storage_setup ⇒ Object
It run when the engine is loaded.
Class Method Details
.storage_setup ⇒ Object
It run when the engine is loaded. It makes sure that all the required directories for storing assets are in the public dir, creating them if they are missing. It also stores the various paths so they can be retreived using the assets_dir method.
11 12 13 14 |
# File 'lib/gluttonberg/library/storage/filesystem.rb', line 11 def self.storage_setup Library.set_asset_root("public/user_assets", "public/user_assets", "public/test_assets") FileUtils.mkdir(Library.root) unless File.exists?(Library.root) || File.symlink?(Library.root) end |