Added condition for default locale present
This commit is contained in:
parent
d0d6a4147e
commit
888f41a959
|
@ -22,8 +22,8 @@ class Admin::SitesController < OrbitBackendController
|
|||
|
||||
def update
|
||||
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({:enable_language_detection => false})
|
||||
elsif params[:site][:enable_language_detection] && @site.default_locale.present?
|
||||
Site.update_all({:default_locale => nil})
|
||||
end
|
||||
# if params[:site][:enable_language_detection]
|
||||
|
|
Reference in New Issue