app/controllers/alchemy/base_controller.rb in alchemy_cms-2.5.0.rc3 vs app/controllers/alchemy/base_controller.rb in alchemy_cms-2.5.0

- old
+ new

@@ -9,11 +9,11 @@ before_filter :set_current_site before_filter :set_language before_filter :mailer_set_url_options before_filter :store_user_request_time - helper_method :current_server, :current_site + helper_method :current_server, :current_site, :multi_site? # Returns a host string with the domain the app is running on. def current_server # For local development server if request.port != 80 @@ -32,9 +32,13 @@ Alchemy::Config.get(name) end def multi_language? Language.published.count > 1 + end + + def multi_site? + Site.count > 1 end def raise_not_found_error raise ActionController::RoutingError.new('Not Found') end