blank site now can be start from rake site:build

This commit is contained in:
Matt K. Fu committed 2013-05-14 10:32:53 +08:00
1 parent 88d55989de
commit 1096db79b6
3 files changed
+20 -3

No files matched your search

+1 -1
View File
@@ -155,7 +155,7 @@ class ApplicationController < ActionController::Base
# Set the site variables
def set_site
# set site if exist or create site
@site = Site.first || Site.create({:valid_locales => [], :in_use_locales => []})
@site = Site.first || Site.create({:valid_locales => VALID_LOCALES, :in_use_locales => VALID_LOCALES})
session[:site] = @site.id
@site_in_use_locales = site_locales_default_head(@site.in_use_locales)
@site_valid_locales = site_locales_default_head(@site.valid_locales)
+1 -1
View File
@@ -5,7 +5,7 @@ class PagesController < ApplicationController
# caches_page :index
def check_frontend_open
if Me.frontend_closed
if Me.frontend_closed and current_user.nil? #Need to be change
redirect_to '/admin/dashboards'
end
end