Fixed for failed migration when installing refinery_cms_blog. Also makes it consistent with generated engine format.

This commit is contained in:
Nate Bird 2011-03-25 08:18:57 -07:00
parent 3642dfbe31
commit c583f930e8

View file

@ -1,6 +1,8 @@
User.find(:all).each do |user|
user.plugins.create(:name => "refinerycms_blog",
:position => (user.plugins.maximum(:position) || -1) +1)
if user.plugins.where(:name => 'refinerycms_blog').blank?
user.plugins.create(:name => "refinerycms_blog",
:position => (user.plugins.maximum(:position) || -1) +1)
end
end
page = Page.create(