Sha256: ff9c6940b4689dd9448e8d492a17f64896fccf543497f9790cb50f422c5b08d8

Contents?: true

Size: 596 Bytes

Versions: 1

Compression:

Stored size: 596 Bytes

Contents

User.find(:all).each do |user|
  user.plugins.create(:name => "<%= class_name.pluralize.underscore.downcase %>",
                      :position => (user.plugins.maximum(:position) || -1) +1)
end

page = Page.create(
  :title => "<%= class_name.pluralize.underscore.titleize %>",
  :link_url => "/<%= plural_name %>",
  :deletable => false,
  :position => ((Page.maximum(:position, :conditions => {:parent_id => nil}) || -1)+1),
  :menu_match => "^/<%= plural_name %>(\/|\/.+?|)$"
)
Page.default_parts.each do |default_page_part|
  page.parts.create(:title => default_page_part, :body => nil)
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
refinerycms-0.9.8.5 vendor/refinerycms/core/lib/generators/refinery_engine/templates/db/seeds/plural_name.rb