Class: OrdinaryCms::Factories::Page

Inherits:
Object
  • Object
show all
Includes:
Mongoid::Document
Defined in:
app/models/ordinary_cms/factories/page.rb

Instance Method Summary collapse

Instance Method Details

#build(params = {}) ⇒ Object



13
14
15
16
17
18
# File 'app/models/ordinary_cms/factories/page.rb', line 13

def build(params = {})
  page = OrdinaryCms::Page.new params
  sections.each {|s| page.sections << s.build}
  page.factory = self
  page
end