Fixed Default Locale
This commit is contained in:
parent
a433f4f9a4
commit
d0d6a4147e
|
@ -21,9 +21,14 @@ class Admin::SitesController < OrbitBackendController
|
|||
end
|
||||
|
||||
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})
|
||||
end
|
||||
# if params[:site][:enable_language_detection]
|
||||
# Site.update_all({:default_locale => nil})
|
||||
# end
|
||||
@site.update_attributes(params[:site])
|
||||
redirect_to :back
|
||||
end
|
||||
|
|
Reference in New Issue