Sha256: 51ec7212a7e5d2b59e63fa394cd5c92ceda56230ff765f1f6f4368032e8dc70b

Contents?: true

Size: 502 Bytes

Versions: 3

Compression:

Stored size: 502 Bytes

Contents

User.find(:all).each do |user|
  user.plugins.create(:name => "<%= singular_name %>",
                      :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

3 entries across 3 versions & 1 rubygems

Version Path
refinerycms-blog-1.0.rc13 lib/generators/refinery_blog/templates/db/seeds/seed.rb
refinerycms-blog-1.0.rc11 lib/generators/refinery_blog/templates/db/seeds/seed.rb
refinerycms-blog-1.0.rc10 lib/generators/refinery_blog/templates/db/seeds/seed.rb