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

load

parent e4d5faf9
No related branches found
No related tags found
No related merge requests found
......@@ -35,10 +35,12 @@ class Communication::Block::Template::Base
end
def #{property}
load_data
#{property}_component.data
end
def #{property}=(value)
load_data
#{property}_component.data = value
end
......@@ -47,6 +49,7 @@ class Communication::Block::Template::Base
def initialize(block)
@block = block
@data_loaded = false
end
def data=(value)
......@@ -92,6 +95,13 @@ class Communication::Block::Template::Base
}
end
def load_data
return if @data_loaded
# Accessing the data loads it from database
block.data
@data_loaded = true
end
def build_git_dependencies
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