diff options
Diffstat (limited to 'activemodel/lib/active_model/validations/clusivity.rb')
-rw-r--r-- | activemodel/lib/active_model/validations/clusivity.rb | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/activemodel/lib/active_model/validations/clusivity.rb b/activemodel/lib/active_model/validations/clusivity.rb index d49af603bb..0b9b5ce6a1 100644 --- a/activemodel/lib/active_model/validations/clusivity.rb +++ b/activemodel/lib/active_model/validations/clusivity.rb @@ -1,4 +1,6 @@ -require 'active_support/core_ext/range' +# frozen_string_literal: true + +require "active_support/core_ext/range" module ActiveModel module Validations @@ -16,12 +18,12 @@ module ActiveModel def include?(record, value) members = if delimiter.respond_to?(:call) - delimiter.call(record) - elsif delimiter.respond_to?(:to_sym) - record.send(delimiter) - else - delimiter - end + delimiter.call(record) + elsif delimiter.respond_to?(:to_sym) + record.send(delimiter) + else + delimiter + end members.send(inclusion_method(members), value) end |