Skip to content
Snippets Groups Projects
Unverified Commit 7be20d66 authored by Sébastien Gaya's avatar Sébastien Gaya
Browse files

denormalize university_id if not present

parent ab8239b8
No related branches found
No related tags found
No related merge requests found
......@@ -4,7 +4,7 @@ Rails.application.config.to_prepare do
# Hook ActiveStorage::Attachment to add brand_id to attachments records
ActiveStorage::Attachment.class_eval do
after_save :denormalize_university_id_for_blob
after_save :denormalize_university_id_for_blob, unless: :university_id
def denormalize_university_id_for_blob
university_id = case self.record.class.name
......
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