From aa662cecada500b57d8959f311a2a74e41e6211a Mon Sep 17 00:00:00 2001 From: Akihiko Odaki Date: Mon, 22 May 2017 13:00:07 +0900 Subject: single_user_mode? always returns boolean (#3215) This change also adds a specification for the method. --- app/controllers/application_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/controllers') diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index d4428c054..5267489e8 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -61,7 +61,7 @@ class ApplicationController < ActionController::Base end def single_user_mode? - @single_user_mode ||= Rails.configuration.x.single_user_mode && Account.first + @single_user_mode ||= Rails.configuration.x.single_user_mode && Account.any? end def current_account -- cgit