Class: FileBlock

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

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from AbstractFileBlock

#path, publishable?

Class Method Details

.display_nameObject



17
18
19
# File 'app/models/file_block.rb', line 17

def self.display_name
  "File"
end

Instance Method Details

#set_attachment_file_pathObject



5
6
7
8
9
# File 'app/models/file_block.rb', line 5

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



11
12
13
14
15
# File 'app/models/file_block.rb', line 11

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