Module: Paperclip::ClassMethods
- Defined in:
- lib/paperclip/has_attached_file_override.rb
Instance Method Summary collapse
- #add_attachment_attributes(name, options) ⇒ Object
- #attachments_names ⇒ Object
- #attachmets_recipes ⇒ Object
- #has_attached_file(name, options = {}) ⇒ Object
Instance Method Details
#add_attachment_attributes(name, options) ⇒ Object
8 9 10 11 |
# File 'lib/paperclip/has_attached_file_override.rb', line 8 def (name, ) @attachmets_recipes ||= {} @attachmets_recipes[name.to_sym] = .fetch(:attributes, []) end |
#attachments_names ⇒ Object
17 18 19 |
# File 'lib/paperclip/has_attached_file_override.rb', line 17 def attachmets_recipes.keys end |
#attachmets_recipes ⇒ Object
13 14 15 |
# File 'lib/paperclip/has_attached_file_override.rb', line 13 def attachmets_recipes @attachmets_recipes || {} end |
#has_attached_file(name, options = {}) ⇒ Object
3 4 5 6 |
# File 'lib/paperclip/has_attached_file_override.rb', line 3 def has_attached_file(name, = {}) (name, ) HasAttachedFile.define_on(self, name, ) end |