Sha256: 387c89beaba534c182cc858b416960253c221d8d58adc10e14d43c0d419bfd35

Contents?: true

Size: 498 Bytes

Versions: 9

Compression:

Stored size: 498 Bytes

Contents

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

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
refinerycms-blog-1.3.2 db/seeds/refinerycms_blog.rb
refinerycms-blog-1.3.1 db/seeds/refinerycms_blog.rb
refinerycms-blog-1.3 db/seeds/refinerycms_blog.rb
refinerycms-blog-1.2 lib/generators/refinerycms_blog/templates/db/seeds/seed.rb
refinerycms-blog-1.1 lib/generators/refinerycms_blog/templates/db/seeds/seed.rb
refinerycms-blog-1.0.1 lib/generators/refinerycms_blog/templates/db/seeds/seed.rb
refinerycms-blog-1.0.rc16 lib/generators/refinery_blog/templates/db/seeds/seed.rb
refinerycms-blog-1.0.rc15 lib/generators/refinery_blog/templates/db/seeds/seed.rb
refinerycms-blog-1.0.rc14 lib/generators/refinery_blog/templates/db/seeds/seed.rb