Skip to content

Instantly share code, notes, and snippets.

@timuckun
Created March 16, 2011 21:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timuckun/873304 to your computer and use it in GitHub Desktop.
Save timuckun/873304 to your computer and use it in GitHub Desktop.
User.find(:all).each do |user|
user.plugins.create(:name => "refinerycms_news",
:position => (user.plugins.maximum(:position) || -1) +1)
end
page = Page.create(
:title => "News",
:link_url => "/news",
:deletable => false,
:position => ((Page.maximum(:position, :conditions => {:parent_id => nil}) || -1)+1),
:menu_match => "^/news.*$"
)
Page.default_parts.each do |default_page_part|
page.parts.create(:title => default_page_part, :body => nil)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment