Class: Cms::ImageBlock

Inherits:
AbstractFileBlock show all
Defined in:
app/models/cms/image_block.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from AbstractFileBlock

#file_size, #parent, #path, publishable?, #set_attachment_path, #set_attachment_section

Class Method Details

.display_nameObject



9
10
11
# File 'app/models/cms/image_block.rb', line 9

def self.display_name
  "Image"
end

Instance Method Details

#attachable_typeObject

Override default behavior to handle STI class when looking up other versions of attachments.



18
19
20
# File 'app/models/cms/image_block.rb', line 18

def attachable_type
  Cms::Attachment::FILE_BLOCKS
end

#imageObject



13
14
15
# File 'app/models/cms/image_block.rb', line 13

def image
  file
end