app/models/entities/opportunity.rb in fat_free_crm-0.16.4 vs app/models/entities/opportunity.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
#------------------------------------------------------------------------------
@@ -168,10 +170,10 @@
private
# Make sure at least one user has been selected if the contact is being shared.
#----------------------------------------------------------------------------
def users_for_shared_access
- errors.add(:access, :share_opportunity) if self[:access] == "Shared" && !permissions.any?
+ errors.add(:access, :share_opportunity) if self[:access] == "Shared" && permissions.none?
end
#----------------------------------------------------------------------------
def increment_opportunities_count
Campaign.increment_counter(:opportunities_count, campaign_id) if campaign_id