Sha256: 8249c0cb5d0dc6565febe96793300bbf92b5c237085266d5acf1f638314ed3dc

Contents?: true

Size: 471 Bytes

Versions: 1

Compression:

Stored size: 471 Bytes

Contents

module Valle
  class BoundsManager

    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|
          column = AbstractAdapter::ColumnWrapper.wrap(original_column)
          ValidationSetter.add_validator(column, klass)
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
valle-0.0.2 lib/valle/bounds_manager.rb