From fd687b749c1afa9a327f22ed980ca72fe578f93a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ug=CC=A7is=20Ozols?= Date: Wed, 4 Sep 2013 08:18:51 +0300 Subject: Specify position for each page part when seeding db. #318 --- db/seeds.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/db/seeds.rb b/db/seeds.rb index 91018db..6eaa1ba 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -13,7 +13,7 @@ if defined?(Refinery::Page) and !Refinery::Page.exists?(:link_url => '/blog') :menu_match => "^/blogs?(\/|\/.+?|)$" ) - Refinery::Pages.default_parts.each do |default_page_part| - page.parts.create(:title => default_page_part, :body => nil) + Refinery::Pages.default_parts.each_with_index do |default_page_part, index| + page.parts.create(:title => default_page_part, :body => nil, :position => index) end end -- cgit v1.2.3