0
0
Fork 0

single_user_mode? always returns boolean (#3215)

This change also adds a specification for the method.
This commit is contained in:
Akihiko Odaki 2017-05-22 13:00:07 +09:00 committed by Eugen Rochko
parent 84608c3ff8
commit aa662cecad
2 changed files with 25 additions and 1 deletions

View file

@ -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