Sha256: 606d3e7da4cc3730acc0f8c08b05a12232f107ae4419f12068e48c38d219b19e
Contents?: true
Size: 694 Bytes
Versions: 8
Compression:
Stored size: 694 Bytes
Contents
User.find(:all).each do |user| if user.plugins.find_by_name('<%= class_name.pluralize.underscore.downcase %>').nil? user.plugins.create(:name => '<%= class_name.pluralize.underscore.downcase %>', :position => (user.plugins.maximum(:position) || -1) +1) end 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
8 entries across 8 versions & 1 rubygems