Class: ImageBlock

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

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from AbstractFileBlock

#path, publishable?

Class Method Details

.display_nameObject



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

def self.display_name
  "Image"
end

Instance Method Details

#set_attachment_file_pathObject



6
7
8
9
10
# File 'app/models/image_block.rb', line 6

def set_attachment_file_path
  if @attachment_file_path && @attachment_file_path != attachment.file_path
    attachment.file_path = @attachment_file_path
  end
end

#set_attachment_sectionObject



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

def set_attachment_section
  if @attachment_section_id && @attachment_section_id != attachment.section_id
    attachment.section_id = @attachment_section_id 
  end
end