Class: Sibu::Utils
- Inherits:
-
Object
- Object
- Sibu::Utils
- Defined in:
- lib/sibu/utils.rb
Class Method Summary collapse
Class Method Details
.convert_sections ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 |
# File 'lib/sibu/utils.rb', line 3 def self.convert_sections Sibu::Site.all.each do |s| sections = s.sections s.update(sections: sections.keys.map {|k| {id: k, elements: sections[k]}}) end Sibu::Page.all.each do |p| sections = p.sections p.update(sections: sections.keys.map {|k| {id: k, elements: sections[k]}}) end end |