Module: Attach
- Defined in:
- lib/attach.rb,
lib/attach/file.rb,
lib/attach/railtie.rb,
lib/attach/version.rb,
lib/attach/processor.rb,
lib/attach/attachment.rb,
lib/attach/middleware.rb,
lib/attach/attachment_dsl.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, AttachmentDSL, File, Middleware, Processor, Railtie
Constant Summary
collapse
- VERSION =
'1.1.0'.freeze
Class Method Summary
collapse
Class Method Details
.asset_host ⇒ Object
19
20
21
|
# File 'lib/attach.rb', line 19
def self.asset_host
@asset_host
end
|
.asset_host=(host) ⇒ Object
23
24
25
|
# File 'lib/attach.rb', line 23
def self.asset_host=(host)
@asset_host = host
end
|
.backend ⇒ Object
8
9
10
11
12
13
|
# File 'lib/attach.rb', line 8
def self.backend
@backend ||= begin
require 'attach/backends/database'
Attach::Backends::Database.new
end
end
|
.backend=(backend) ⇒ Object
15
16
17
|
# File 'lib/attach.rb', line 15
def self.backend=(backend)
@backend = backend
end
|
.use_filesystem!(config = {}) ⇒ Object
27
28
29
30
|
# File 'lib/attach.rb', line 27
def self.use_filesystem!(config = {})
require 'attach/backends/file_system'
@backend = Attach::Backends::FileSystem.new(config)
end
|