aboutsummaryrefslogtreecommitdiffstats
path: root/db
diff options
context:
space:
mode:
authorNate Bird <natebird@gmail.com>2011-03-25 08:18:57 -0700
committerNate Bird <natebird@gmail.com>2011-03-25 08:18:57 -0700
commitc583f930e8b4ec1eda74b510b45b881dc40b4b46 (patch)
tree98d16f22fa0da1e30a7814f055a331d23e343645 /db
parent3642dfbe3168f1396c1b2b9c774dc95255d7c1e3 (diff)
downloadrefinerycms-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.
Diffstat (limited to 'db')
-rw-r--r--db/seeds/refinerycms_blog.rb6
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(