Class: Workarea::ContentBlockPageSeeds
- Inherits:
-
Object
- Object
- Workarea::ContentBlockPageSeeds
- Defined in:
- app/seeds/workarea/content_block_page_seeds.rb
Instance Method Summary collapse
Instance Method Details
#perform ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'app/seeds/workarea/content_block_page_seeds.rb', line 3 def perform puts "Adding content blocks page..." page = Content::Page.create!( name: "Content Blocks" ) content = Content.for(page) Workarea.config.content_block_types.each do |block_type| unless block_type..include?("taxonomy") content.blocks.build( type: block_type, data: block_type.defaults ) end end content.save! end |