Fixed Default Locale
This commit is contained in:
parent
a433f4f9a4
commit
d0d6a4147e
|
@ -21,9 +21,14 @@ class Admin::SitesController < OrbitBackendController
|
||||||
end
|
end
|
||||||
|
|
||||||
def update
|
def update
|
||||||
if params[:site][:enable_language_detection]
|
if params[:site][:default_locale] && @site.enable_language_detection.eql?(true)
|
||||||
|
Site.update_all({:enable_language_detection => false})
|
||||||
|
elsif params[:site][:enable_language_detection]
|
||||||
Site.update_all({:default_locale => nil})
|
Site.update_all({:default_locale => nil})
|
||||||
end
|
end
|
||||||
|
# if params[:site][:enable_language_detection]
|
||||||
|
# Site.update_all({:default_locale => nil})
|
||||||
|
# end
|
||||||
@site.update_attributes(params[:site])
|
@site.update_attributes(params[:site])
|
||||||
redirect_to :back
|
redirect_to :back
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue