aboutsummaryrefslogtreecommitdiffstats
path: root/db
diff options
context:
space:
mode:
authorUģis Ozols <ugis.ozolss@gmail.com>2013-09-04 08:18:51 +0300
committerUģis Ozols <ugis.ozolss@gmail.com>2013-09-04 08:18:51 +0300
commitfd687b749c1afa9a327f22ed980ca72fe578f93a (patch)
treefbbfa2f71aea62c4676e932a019cf07319ea3160 /db
parent3859634089d70fb8b13dfe908172a0f7dc4a4120 (diff)
downloadrefinerycms-blog-fd687b749c1afa9a327f22ed980ca72fe578f93a.tar.gz
refinerycms-blog-fd687b749c1afa9a327f22ed980ca72fe578f93a.tar.bz2
refinerycms-blog-fd687b749c1afa9a327f22ed980ca72fe578f93a.zip
Specify position for each page part when seeding db.
#318
Diffstat (limited to 'db')
-rw-r--r--db/seeds.rb4
1 files 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