blank site now can be start from rake site:build
This commit is contained in:
1 parent
88d55989de
commit
1096db79b6
3 files changed
+20
-3
No files matched your search
+18
-1
@@ -8,7 +8,24 @@ namespace :site do
|
||||
Purchase.destroy_all
|
||||
|
||||
Site.create( :school => 'RulingDigital University', :department => 'Computer Science', :valid_locales => [ 'en', 'zh_tw' ], :in_use_locales => [ 'zh_tw', 'en' ])
|
||||
|
||||
User.create!(:email=>'chris@rulingcom.com',:admin=>true,:user_id=>'chris',:password=>'password')
|
||||
|
||||
put "Run ensureIndex on chunks before you upload something. If You start DB from nothing."
|
||||
puts 'Please upload design package and run rake site:necessary_data'
|
||||
end
|
||||
|
||||
task :necessary_data => :environment do
|
||||
site = Site.first
|
||||
site.title = 'RulingOrbit Demo Site'
|
||||
site.save
|
||||
|
||||
# home_trans = I18nVariable.create!( :document_class => 'Home', :key => 'home', :en => 'Homepage', :zh_tw => '首頁')
|
||||
design = Design.first
|
||||
theme = design.themes.first
|
||||
home = Page.new( :design_id => design.id, :name => 'home', :is_published => true, :theme_id => theme.id )
|
||||
|
||||
home.title_translations = {"zh_tw"=>"首頁", "en"=>"Home"}
|
||||
home.save
|
||||
end
|
||||
|
||||
end
|
||||
Reference in new issue
Block a user