Module: AttachIt::InstanceMethods
- Defined in:
- lib/attach_it/attach_it.rb
Instance Method Summary collapse
- #destroy_attachments ⇒ Object
- #information_for(name = nil, options = nil) ⇒ Object
- #save_attachments ⇒ Object
Instance Method Details
#destroy_attachments ⇒ Object
82 83 84 85 86 87 88 |
# File 'lib/attach_it/attach_it.rb', line 82 def unless @attachment_options.nil? @attachment_options.keys.each do |name| @attachment_options[name].delete end end end |
#information_for(name = nil, options = nil) ⇒ Object
69 70 71 72 |
# File 'lib/attach_it/attach_it.rb', line 69 def information_for(name = nil, = nil) @attachment_options ||= {} @attachment_options[name] ||= AttachmentOptions.new(self, name, ) end |
#save_attachments ⇒ Object
74 75 76 77 78 79 80 |
# File 'lib/attach_it/attach_it.rb', line 74 def unless @attachment_options.nil? @attachment_options.keys.each do |name| @attachment_options[name].save end end end |