Sha256: 71f7f272ae4995b62a6970fe36dde8d8bd4578821e596334038d284207a2b529
Contents?: true
Size: 354 Bytes
Versions: 24
Compression:
Stored size: 354 Bytes
Contents
# frozen_string_literal: true module Maglev class PresenceValidator < ActiveModel::Validations::PresenceValidator def validate_each(record, attribute, value) value = 'false' if value == false # trick the validator super end private def clean_item_errors(item) item.errors.full_messages.join(', ') end end end
Version data entries
24 entries across 24 versions & 1 rubygems