Class: Decidim::UploadValidationForm::AttachmentContextProxy
- Inherits:
 - 
      Object
      
        
- Object
 - Decidim::UploadValidationForm::AttachmentContextProxy
 
 
- Defined in:
 - app/forms/decidim/upload_validation_form.rb
 
Overview
This class provides ability to interpret the attachment context based on the details available within the context of this class. Normally the attachment context would be defined by the record to which the attachment are added to, e.g. proposals (participant context) or participatory processes (admin context). Unfortunately this information is not available when the parameters are passed to the upload validation.
Instance Attribute Summary collapse
- 
  
    
      #attachment_context  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute attachment_context.
 - 
  
    
      #organization  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute organization.
 
Class Method Summary collapse
Instance Method Summary collapse
- 
  
    
      #initialize(organization, attachment_context)  ⇒ AttachmentContextProxy 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of AttachmentContextProxy.
 
Constructor Details
#initialize(organization, attachment_context) ⇒ AttachmentContextProxy
Returns a new instance of AttachmentContextProxy.
      84 85 86 87  | 
    
      # File 'app/forms/decidim/upload_validation_form.rb', line 84 def initialize(organization, ) @organization = organization @attachment_context = end  | 
  
Instance Attribute Details
#attachment_context ⇒ Object (readonly)
Returns the value of attribute attachment_context.
      80 81 82  | 
    
      # File 'app/forms/decidim/upload_validation_form.rb', line 80 def @attachment_context end  | 
  
#organization ⇒ Object (readonly)
Returns the value of attribute organization.
      80 81 82  | 
    
      # File 'app/forms/decidim/upload_validation_form.rb', line 80 def organization @organization end  | 
  
Class Method Details
.polymorphic_name ⇒ Object
      93 94 95  | 
    
      # File 'app/forms/decidim/upload_validation_form.rb', line 93 def self.polymorphic_name "Decidim::Organization" end  | 
  
.primary_key ⇒ Object
      89 90 91  | 
    
      # File 'app/forms/decidim/upload_validation_form.rb', line 89 def self.primary_key :id end  |