summaryrefslogtreecommitdiff
path: root/lib/tasks
diff options
context:
space:
mode:
authorhukl <contact@smyck.org>2009-02-22 13:23:38 +0100
committerhukl <contact@smyck.org>2009-02-22 13:23:38 +0100
commit51e91975cbfb81de40f2b8dd0ddada84b0c93ae6 (patch)
tree9c88fbcc1408814a4470590c4adc15feba487227 /lib/tasks
parentc39eb1e9839664deb68b50b2a9db16770d42852c (diff)
created route for home page, removed rails index.html
Diffstat (limited to 'lib/tasks')
-rw-r--r--lib/tasks/development_init.rake14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/tasks/development_init.rake b/lib/tasks/development_init.rake
index 886474b..cdfe9e9 100644
--- a/lib/tasks/development_init.rake
+++ b/lib/tasks/development_init.rake
@@ -39,4 +39,18 @@ namespace :cccms do
39 i = UpdateImporter.new("#{RAILS_ROOT}/db/updates") 39 i = UpdateImporter.new("#{RAILS_ROOT}/db/updates")
40 i.import_xml 40 i.import_xml
41 end 41 end
42
43 desc "Create Home Page"
44 task :create_home_page => :environment do |t|
45 n = Node.create :slug => 'home'
46 n.move_to_child_of Node.root
47
48 d = n.draft
49 d.title = "Startseite"
50 d.abstract = "Wilkommen auf der Seite des CCC"
51 d.body = "Hier gibts content"
52 d.save
53
54 n.publish_draft!
55 end
42end \ No newline at end of file 56end \ No newline at end of file