diff options
author | Philip Arndt <parndt@gmail.com> | 2011-03-04 11:54:12 +1300 |
---|---|---|
committer | Philip Arndt <parndt@gmail.com> | 2011-03-04 11:54:12 +1300 |
commit | 234a7d74d57084a78e51cc52861a81f7d0748a6d (patch) | |
tree | 6552dfac3f45057f4f617573df26f2af0687e71e /db/seeds/seed.rb | |
parent | 1e6190b58c66fda23b6666e46f2a65198841a06f (diff) | |
download | refinerycms-blog-234a7d74d57084a78e51cc52861a81f7d0748a6d.tar.gz refinerycms-blog-234a7d74d57084a78e51cc52861a81f7d0748a6d.tar.bz2 refinerycms-blog-234a7d74d57084a78e51cc52861a81f7d0748a6d.zip |
Moved most of the code toward EngineInstaller.
Diffstat (limited to 'db/seeds/seed.rb')
-rw-r--r-- | db/seeds/seed.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/db/seeds/seed.rb b/db/seeds/seed.rb new file mode 100644 index 0000000..f958fab --- /dev/null +++ b/db/seeds/seed.rb @@ -0,0 +1,16 @@ +User.find(:all).each do |user| + user.plugins.create(:name => "refinerycms_blog", + :position => (user.plugins.maximum(:position) || -1) +1) +end + +page = Page.create( + :title => "Blog", + :link_url => "/blog", + :deletable => false, + :position => ((Page.maximum(:position, :conditions => {:parent_id => nil}) || -1)+1), + :menu_match => "^/blogs?(\/|\/.+?|)$" +) + +Page.default_parts.each do |default_page_part| + page.parts.create(:title => default_page_part, :body => nil) +end |