change site controller
This commit is contained in:
parent
260e4ee606
commit
09ee21921a
|
@ -124,7 +124,11 @@ class Admin::SitesController < OrbitAdminController
|
||||||
if params[:site][:enable_language_detection].eql?("0")
|
if params[:site][:enable_language_detection].eql?("0")
|
||||||
Site.update_all({:enable_language_detection => false})
|
Site.update_all({:enable_language_detection => false})
|
||||||
elsif params[:site][:enable_language_detection].eql?("1")
|
elsif params[:site][:enable_language_detection].eql?("1")
|
||||||
|
if @site.in_use_locales.include?(:en)
|
||||||
Site.update_all({:default_locale => nil})
|
Site.update_all({:default_locale => nil})
|
||||||
|
else
|
||||||
|
Site.update_all({:enable_language_detection => false})
|
||||||
|
end
|
||||||
end
|
end
|
||||||
if !@site.in_use_locales.include?I18n.locale
|
if !@site.in_use_locales.include?I18n.locale
|
||||||
I18n.locale = @site.in_use_locales.first
|
I18n.locale = @site.in_use_locales.first
|
||||||
|
|
Loading…
Reference in New Issue