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

refactor

parent 6761ef34
No related branches found
No related tags found
No related merge requests found
......@@ -38,13 +38,6 @@ module Backlinkable
end
def backlinks_blocks(website)
case self.class.to_s
when 'University::Organization'
website.blocks.organizations
when 'University::Person'
website.blocks.persons
else
raise "#{self.class} should map to the correct kind of blocks"
end
raise NotImplementedError
end
end
\ No newline at end of file
......@@ -130,6 +130,10 @@ class University::Organization < ApplicationRecord
protected
def backlinks_blocks(website)
website.blocks.organizations
end
def explicit_blob_ids
[
logo&.blob_id,
......
......@@ -232,6 +232,10 @@ class University::Person < ApplicationRecord
protected
def backlinks_blocks(website)
website.blocks.persons
end
def explicit_blob_ids
[picture&.blob_id]
end
......
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