Module: Attach
- Defined in:
- lib/attach.rb,
lib/attach/railtie.rb,
lib/attach/version.rb,
lib/attach/processor.rb,
lib/attach/attachment.rb,
lib/attach/middleware.rb,
lib/attach/model_extension.rb,
lib/attach/attachment_binary.rb,
lib/attach/backends/abstract.rb,
lib/attach/backends/database.rb,
lib/attach/backends/file_system.rb
Defined Under Namespace
Modules: Backends, ModelExtension
Classes: Attachment, AttachmentBinary, Middleware, Processor, Railtie
Constant Summary
collapse
- VERSION =
'1.0.0'
Class Method Summary
collapse
Class Method Details
.backend ⇒ Object
7
8
9
10
11
12
|
# File 'lib/attach.rb', line 7
def self.backend
@backend ||= begin
require 'attach/backends/database'
Attach::Backends::Database.new
end
end
|
.backend=(backend) ⇒ Object
14
15
16
|
# File 'lib/attach.rb', line 14
def self.backend=(backend)
@backend = backend
end
|
.use_filesystem!(config = {}) ⇒ Object
18
19
20
21
|
# File 'lib/attach.rb', line 18
def self.use_filesystem!(config = {})
require 'attach/backends/file_system'
@backend = Attach::Backends::FileSystem.new(config)
end
|