diff --git a/Gemfile b/Gemfile index 38a92582..ceece7b6 100644 --- a/Gemfile +++ b/Gemfile @@ -97,7 +97,8 @@ group :test, :development do gem "watchr" gem "spork" gem "capybara" - gem 'rack-mini-profiler' + #gem 'rack-mini-profiler' + gem "better_errors" # gem 'yard' # gem "bluecloth" end diff --git a/app/controllers/pages_controller.rb b/app/controllers/pages_controller.rb index 69a011d9..ec100871 100644 --- a/app/controllers/pages_controller.rb +++ b/app/controllers/pages_controller.rb @@ -114,7 +114,7 @@ class PagesController < ApplicationController end def check_frontend_open - if !Site.first.frontend_closed && current_user.nil? #Need to be change + if Site.first.frontend_open && current_user.nil? #Need to be change redirect_to '/admin/dashboards' end end diff --git a/app/models/site.rb b/app/models/site.rb index ccaab840..68fe40a4 100644 --- a/app/models/site.rb +++ b/app/models/site.rb @@ -12,7 +12,7 @@ class Site field :private_key, :type => Binary field :public_key, :type => Binary - field :frontend_closed, :type => Boolean, :default => false + field :frontend_open, :type => Boolean, :default => true field :backend_openness_on, :type => Boolean, :default => false field :desktop_closed, :type => Boolean, :default => false field :sitemap_menu_in_header, :type => Boolean, :default => false diff --git a/app/views/admin/sites/preference.html.erb b/app/views/admin/sites/preference.html.erb index 4115e2ec..61b802f8 100644 --- a/app/views/admin/sites/preference.html.erb +++ b/app/views/admin/sites/preference.html.erb @@ -114,10 +114,10 @@