Class: Workarea::ThemeLayoutContentSeeds
- Inherits:
-
Object
- Object
- Workarea::ThemeLayoutContentSeeds
- Defined in:
- app/seeds/workarea/theme_layout_content_seeds.rb
Instance Method Summary collapse
Instance Method Details
#add_cart_content ⇒ Object
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'app/seeds/workarea/theme_layout_content_seeds.rb', line 43 def add_cart_content puts "Adding cart page content..." content = Content.for("Cart") content.blocks.create!( area: "with_items", type: "html", data: { html: "<p>Cart page content</p>" } ) content.blocks.create!( area: "empty", type: "html", data: { html: "<p>Empty cart content</p>" } ) end |
#add_layout_content ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'app/seeds/workarea/theme_layout_content_seeds.rb', line 8 def add_layout_content puts "Adding theme layout content..." content = Content.for("Layout") content.blocks.create!( area: "footer_column_1", type: "taxonomy", data: { header: "Customer Service", start: Navigation::Taxon .where(name: "Customer Service") .first .id } ) content.blocks.create!( area: "footer_column_2", type: "html", data: { html: "<h3 class='page-footer__heading'>Contact</h3> <p>Weblinc</br>22 south 3rd street </br>Philadelphia </br> PA </br> 19106</p><p>Phone: <a class='link link--secondary' href='tel:215-925-1800'>215-925-1800</a></p>", } ) content.blocks.create!( area: "footer_column_3", type: "taxonomy", data: { header: "News", start: Navigation::Taxon .where(name: "Customer Service") .first .id } ) end |
#perform ⇒ Object
3 4 5 6 |
# File 'app/seeds/workarea/theme_layout_content_seeds.rb', line 3 def perform add_layout_content add_cart_content end |