Class: Decidim::ContentBlockAttachment
- Inherits:
 - 
      ApplicationRecord
      
        
- Object
 - ActiveRecord::Base
 - ApplicationRecord
 - Decidim::ContentBlockAttachment
 
 
- Includes:
 - HasUploadValidations
 
- Defined in:
 - app/models/decidim/content_block_attachment.rb
 
Overview
Attachment can be any type of document or images related to a partcipatory process.
Instance Method Summary collapse
Methods included from HasUploadValidations
#maximum_avatar_size, #maximum_upload_size
Instance Method Details
#attached_uploader(name) ⇒ Object
      29 30 31 32 33  | 
    
      # File 'app/models/decidim/content_block_attachment.rb', line 29 def attached_uploader(name) return unless name == :file uploader.new(self, :file) end  | 
  
#uploader ⇒ Object
      17 18 19 20 21 22 23 24 25 26 27  | 
    
      # File 'app/models/decidim/content_block_attachment.rb', line 17 def uploader return if content_block.blank? config = manifest.images.find do |image_config| image_config[:name].to_s == name.to_s end return if config.blank? config[:uploader].constantize end  |