app/models/entities/lead.rb in fat_free_crm-0.16.4 vs app/models/entities/lead.rb in fat_free_crm-0.17.1

- old
+ new

@@ -1,5 +1,7 @@ +# frozen_string_literal: true + # Copyright (c) 2008-2013 Michael Dvorkin and contributors. # # Fat Free CRM is freely distributable under the terms of MIT license. # See MIT-LICENSE file or http://www.opensource.org/licenses/mit-license.php #------------------------------------------------------------------------------ @@ -183,10 +185,10 @@ end # Make sure at least one user has been selected if the lead is being shared. #---------------------------------------------------------------------------- def users_for_shared_access - errors.add(:access, :share_lead) if self[:access] == "Shared" && !permissions.any? + errors.add(:access, :share_lead) if self[:access] == "Shared" && permissions.none? end ActiveSupport.run_load_hooks(:fat_free_crm_lead, self) end