Skip to content
Snippets Groups Projects
Commit 2377574e authored by Arnaud Levy's avatar Arnaud Levy
Browse files

fix

parent 2336b6e4
No related branches found
No related tags found
No related merge requests found
......@@ -45,20 +45,6 @@ class Communication::Block::Template
university.active_storage_blobs.find id
end
def extract_image_alt_and_credit(source, variable)
blob = find_blob source, variable
return if blob.nil?
alt = source["alt"] || source["#{variable}_alt"]
credit = source["credit"] || source["#{variable}_credit"]
text = source["text"] || source["#{variable}_text"]
{
blob: blob,
alt: alt,
credit: credit,
text: text
}.to_dot
end
def data
block.data || {}
end
......
......@@ -133,7 +133,7 @@ class Communication::Block::Template::Base
end
def blob_with_id(id)
university.active_storage_blobs.find id
university.active_storage_blobs.find_by id: id
end
def default_data
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment