about summary refs log tree commit diff
path: root/app/controllers
diff options
context:
space:
mode:
authorAkihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp>2017-05-22 13:00:07 +0900
committerEugen Rochko <eugen@zeonfederated.com>2017-05-22 06:00:06 +0200
commitaa662cecada500b57d8959f311a2a74e41e6211a (patch)
tree390049deaaf607c4243c1c990b77fab93bf0b965 /app/controllers
parent84608c3ff8fe51654868546cca6e64730d06286e (diff)
single_user_mode? always returns boolean (#3215)
This change also adds a specification for the method.
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/application_controller.rb2
1 files changed, 1 insertions, 1 deletions
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