aboutsummaryrefslogtreecommitdiffstats
path: root/db
diff options
context:
space:
mode:
authorPete Higgins <pete@peterhiggins.org>2012-01-08 13:52:44 -0800
committerPete Higgins <pete@peterhiggins.org>2012-01-08 13:52:44 -0800
commit63b0bec5ff625738ce0072f41fd05439dcd08d0e (patch)
tree0d2560b857aede1836a8f437a0d89d03730694ac /db
parente3e5bcffc3f7ddb744054feee0d7934e4cdc053e (diff)
downloadrefinerycms-blog-63b0bec5ff625738ce0072f41fd05439dcd08d0e.tar.gz
refinerycms-blog-63b0bec5ff625738ce0072f41fd05439dcd08d0e.tar.bz2
refinerycms-blog-63b0bec5ff625738ce0072f41fd05439dcd08d0e.zip
Make DB seed idempotent.
Diffstat (limited to 'db')
-rw-r--r--db/seeds.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/db/seeds.rb b/db/seeds.rb
index bd273ea..d603553 100644
--- a/db/seeds.rb
+++ b/db/seeds.rb
@@ -5,7 +5,7 @@ Refinery::User.find(:all).each do |user|
end
end if defined?(Refinery::User)
-if defined?(Refinery::Page)
+if defined?(Refinery::Page) and !Refinery::Page.exists?(:link_url => '/blog')
page = Refinery::Page.create(
:title => "Blog",
:link_url => "/blog",