diff options
author | Nate Bird <natebird@gmail.com> | 2011-03-25 08:18:57 -0700 |
---|---|---|
committer | Nate Bird <natebird@gmail.com> | 2011-03-25 08:18:57 -0700 |
commit | c583f930e8b4ec1eda74b510b45b881dc40b4b46 (patch) | |
tree | 98d16f22fa0da1e30a7814f055a331d23e343645 | |
parent | 3642dfbe3168f1396c1b2b9c774dc95255d7c1e3 (diff) | |
download | refinerycms-blog-c583f930e8b4ec1eda74b510b45b881dc40b4b46.tar.gz refinerycms-blog-c583f930e8b4ec1eda74b510b45b881dc40b4b46.tar.bz2 refinerycms-blog-c583f930e8b4ec1eda74b510b45b881dc40b4b46.zip |
Fixed for failed migration when installing refinery_cms_blog. Also makes it consistent with generated engine format.
-rw-r--r-- | db/seeds/refinerycms_blog.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/db/seeds/refinerycms_blog.rb b/db/seeds/refinerycms_blog.rb index f958fab..9686c7f 100644 --- a/db/seeds/refinerycms_blog.rb +++ b/db/seeds/refinerycms_blog.rb @@ -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( |