app/controllers/locomotive/api/base_controller.rb in locomotive_cms-2.5.6 vs app/controllers/locomotive/api/base_controller.rb in locomotive_cms-2.5.7
- old
+ new
@@ -37,9 +37,17 @@
def require_account
authenticate_locomotive_account!
end
+ def require_site
+ return true if current_site
+
+ render_no_site_error
+
+ false # halt chain
+ end
+
def set_locale
locale = params[:locale] ||
current_site.try(:default_locale) ||
current_locomotive_account.try(:locale) ||
Locomotive.config.default_locale