diff options
Diffstat (limited to 'db/seeds')
-rw-r--r-- | db/seeds/refinerycms_blog.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/db/seeds/refinerycms_blog.rb b/db/seeds/refinerycms_blog.rb index 0be2a06..19c4370 100644 --- a/db/seeds/refinerycms_blog.rb +++ b/db/seeds/refinerycms_blog.rb @@ -1,20 +1,20 @@ -::User.find(:all).each do |user| +Refinery::User.find(:all).each do |user| if user.plugins.where(:name => 'refinerycms_blog').blank? user.plugins.create(:name => "refinerycms_blog", :position => (user.plugins.maximum(:position) || -1) +1) end -end if defined?(::User) +end if defined?(Refinery::User) -if defined?(::Page) - page = ::Page.create( +if defined?(Refinery::Page) + page = Refinery::Page.create( :title => "Blog", :link_url => "/blog", :deletable => false, - :position => ((Page.maximum(:position, :conditions => {:parent_id => nil}) || -1)+1), + :position => ((Refinery::Page.maximum(:position, :conditions => {:parent_id => nil}) || -1)+1), :menu_match => "^/blogs?(\/|\/.+?|)$" ) - ::Page.default_parts.each do |default_page_part| + Refinery::Page.default_parts.each do |default_page_part| page.parts.create(:title => default_page_part, :body => nil) end end
\ No newline at end of file |