Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions app/models/communication/block/component/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ def university
template.block.university
end

def language
template.block.language
end

def website
template.block.about&.website
end
Expand Down
11 changes: 2 additions & 9 deletions app/models/communication/block/component/file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ def default_data
def dependencies
[
blob,
communication_file
communication_file,
communication_file_localization
]
end

Expand All @@ -57,12 +58,4 @@ def data_empty?
data.nil? || data['communication_file_id'].blank?
end

def university
@university ||= template.block.university
end

def language
@language ||= template.block.language
end

end
8 changes: 8 additions & 0 deletions app/models/communication/file/localization.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,14 @@ def icon
@icon ||= Osuny::FileType.icon_for(original_content_type)
end

def dependencies
[original_blob]
end

def references
[contexts.map(&:about)]
end

def to_s
"#{name}"
end
Expand Down
Loading