aboutsummaryrefslogtreecommitdiffstats
path: root/db/seeds.rb
blob: ccde24244b01a7ec53508f4ad81b90934f8b2b46 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
if defined?(::Refinery::User)
  ::Refinery::User.all.each do |user|
    if user.plugins.where(:name => 'refinerycms-banners').blank?
      user.plugins.create(:name => 'refinerycms-banners',
                          :position => (user.plugins.maximum(:position) || -1) +1)
    end
  end
end


#url = "/banners"
#if defined?(::Refinery::Page) && ::Refinery::Page.where(:link_url => url).empty?
#  page = ::Refinery::Page.create(
#    :title => 'Banners',
#    :link_url => url,
#    :deletable => false,
#    :menu_match => "^#{url}(\/|\/.+?|)$"
#  )
#  Refinery::Pages.default_parts.each do |default_page_part|
#    page.parts.create(:title => default_page_part, :body => nil)
#  end
#end