Sha256: 4649883f9ee0d827e987df223e23fe68ab12fd2af41100be833c26d6acc14d72

Contents?: true

Size: 548 Bytes

Versions: 2

Compression:

Stored size: 548 Bytes

Contents

require "active_model"
require "hydra/validations/version"

module Hydra
  module Validations
    extend ActiveSupport::Concern

    included do
      extend HelperMethods
      include HelperMethods
    end

    module ClassMethods
      protected
      # Overwrites ActiveModel::Validations::ClassMethods, adding :allow_empty
      def _validates_default_keys
        [:if, :unless, :on, :allow_blank, :allow_nil, :strict, :allow_empty]
      end
    end

  end
end

Dir[File.dirname(__FILE__) + "/validations/*.rb"].each { |file| require file }

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
hydra-validations-0.5.0 lib/hydra/validations.rb
hydra-validations-0.4.0 lib/hydra/validations.rb