# フィールドの値チェック
# @param records ActiveRecordのfind結果
# @param field フィールド名
# @param values フィールドの値配列
# @return true...一致, false...不一致
@match_proc = lambda do |records, field, values|
unmatch = values.clone
records.each do |item|
if values.index(item[field]).nil? then return false else unmatch.delete(item[field]) end
end
return 0 >= unmatch.size
end
0 件のコメント:
コメントを投稿