Module: S3Multipart::Uploader::Core
- Includes:
- Callbacks, Validations
- Defined in:
- lib/s3_multipart/uploader.rb
Overview
Generated multipart upload controllers (which reside in the app/uploaders/multipart directory in the Rails application) extend this module.
Instance Attribute Summary collapse
-
#model ⇒ Object
Returns the value of attribute model.
-
#mount_point ⇒ Object
Returns the value of attribute mount_point.
Attributes included from Validations
Attributes included from Callbacks
#on_begin_callback, #on_complete_callback
Class Method Summary collapse
Instance Method Summary collapse
Methods included from Validations
Methods included from Callbacks
Instance Attribute Details
#model ⇒ Object
Returns the value of attribute model.
30 31 32 |
# File 'lib/s3_multipart/uploader.rb', line 30 def model @model end |
#mount_point ⇒ Object
Returns the value of attribute mount_point.
30 31 32 |
# File 'lib/s3_multipart/uploader.rb', line 30 def mount_point @mount_point end |
Class Method Details
.extended(klass) ⇒ Object
32 33 34 |
# File 'lib/s3_multipart/uploader.rb', line 32 def self.extended(klass) Uploader.controllers[klass.to_s.to_sym] = Digest::SHA1.hexdigest(klass.to_s) end |
Instance Method Details
#attach(model, options = {}) ⇒ Object
36 37 38 39 40 41 42 43 |
# File 'lib/s3_multipart/uploader.rb', line 36 def attach(model, = {}) self.mount_point = .delete(:using) self.model = model S3Multipart::Upload.class_eval do has_one(model, ) end end |