Sha256: e7fa1286d376b45a35c89e75962e127c7a0678ebdd0afb8a17cdc27f727623e9

Contents?: true

Size: 621 Bytes

Versions: 3

Compression:

Stored size: 621 Bytes

Contents

if defined?(User)
  User.all.each do |user|
    if user.plugins.where(:name => 'pods').blank?
      user.plugins.create(:name => 'pods',
                          :position => (user.plugins.maximum(:position) || -1) +1)
    end
  end
end

#if defined?(Page)
#  page = Page.create(
#    :title => 'Pods',
#    :link_url => '/pods',
#    :deletable => false,
#    :position => ((Page.maximum(:position, :conditions => {:parent_id => nil}) || -1)+1),
#    :menu_match => '^/pods(\/|\/.+?|)$'
#  )
#  Page.default_parts.each do |default_page_part|
#    page.parts.create(:title => default_page_part, :body => nil)
#  end
#end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
refinerycms-pods-1.0.3 db/seeds/pods.rb
refinerycms-pods-1.0.2 db/seeds/pods.rb
refinerycms-pods-1.0.1 db/seeds/pods.rb