Class: Jigsaw::Layout
Constant Summary
GridConfigurable::SCHEMA, GridConfigurable::SCHEMA_PATH
Instance Method Summary
collapse
#colGap=, #config=, #rowGap=, #sync_slots, #unique_area_names
Instance Method Details
#effective_compiled_css ⇒ Object
25
26
27
28
29
30
31
|
# File 'app/models/jigsaw/layout.rb', line 25
def effective_compiled_css
if linked_to_template? && layout_template
layout_template.compiled_css
else
compiled_css
end
end
|
#effective_config ⇒ Object
17
18
19
20
21
22
23
|
# File 'app/models/jigsaw/layout.rb', line 17
def effective_config
if linked_to_template? && layout_template
layout_template.config
else
config
end
end
|
#link_to_template!(tmpl) ⇒ Object
43
44
45
46
47
|
# File 'app/models/jigsaw/layout.rb', line 43
def link_to_template!(tmpl)
self.layout_template = tmpl
self.linked_to_template = true
save!
end
|
#skip_config_validation? ⇒ Boolean
11
12
13
|
# File 'app/models/jigsaw/layout.rb', line 11
def skip_config_validation?
linked_to_template?
end
|
#unlink_from_template! ⇒ Object
33
34
35
36
37
38
39
40
41
|
# File 'app/models/jigsaw/layout.rb', line 33
def unlink_from_template!
return unless linked_to_template? && layout_template
self.config = layout_template.config.deep_dup
self.linked_to_template = false
self.layout_template = nil
save!
end
|