Skip to content
Browse files

Merge pull request #11177 from yangchenyun/mine

provide a more sementic local variables name in ActiveModel::Validation::Clusivity
  • Loading branch information...
2 parents 7cf6637 + e8fe666 commit 3e0ce665e537d3f1f444a0221456de19eb92882f @josevalim josevalim committed Jun 29, 2013
Showing with 8 additions and 8 deletions.
  1. +8 −8 activemodel/lib/active_model/validations/clusivity.rb
View
16 activemodel/lib/active_model/validations/clusivity.rb
@@ -15,15 +15,15 @@ def check_validity!
private
def include?(record, value)
- exclusions = if delimiter.respond_to?(:call)
- delimiter.call(record)
- elsif delimiter.respond_to?(:to_sym)
- record.send(delimiter)
- else
- delimiter
- end
+ members = if delimiter.respond_to?(:call)
+ delimiter.call(record)
+ elsif delimiter.respond_to?(:to_sym)
+ record.send(delimiter)
+ else
+ delimiter
+ end
- exclusions.send(inclusion_method(exclusions), value)
+ members.send(inclusion_method(members), value)
end
def delimiter

0 comments on commit 3e0ce66

Please sign in to comment.
Something went wrong with that request. Please try again.