spec/validators/ssn_validator.rb in mongoid-rspec-3.0.0 vs spec/validators/ssn_validator.rb in mongoid-rspec-4.0.0

- old
+ new

@@ -1,16 +1,16 @@ -class SsnValidator < ActiveModel::EachValidator - +class SsnValidator < ActiveModel::EachValidator def validate_each(record, attribute, value) unless valid_ssn?(record, attribute, value) record.errors[attribute] << "#{value} is not a valid Social Security Number" end end - def self.kind() :custom end + def self.kind + :custom + end - def valid_ssn?(record, attribute, value) + def valid_ssn?(_record, _attribute, _value) # irrelevant here how validation is done true end - -end \ No newline at end of file +end