Sha256: 092ef7ba0ca0f9c59143d341149fdb1db1d53ecbbd63cc6a28585833017fc6f2
Contents?: true
Size: 560 Bytes
Versions: 9
Compression:
Stored size: 560 Bytes
Contents
module Valle class Manager class << self ## # Add validators for all columns of a given class # # @param [ActiveRecord::Base] klass the AR model class # def add_validators(klass) columns = klass.columns columns.each do |original_column| next unless Valle.can_process_column?(klass.model_name.to_s, original_column.name) column = AbstractAdapter::ColumnWrapper.wrap(original_column) ValidationSetter.add_validator(column, klass) end end end end end
Version data entries
9 entries across 9 versions & 1 rubygems