Sha256: 6017593a2d6eebf41901bd65ccc53c4ccc0466e25672cecdb035d10e275bad90

Contents?: true

Size: 555 Bytes

Versions: 8

Compression:

Stored size: 555 Bytes

Contents

module ActiveModel
  module Validations

    module HelperMethods
      def validates_date(*attr_names)
        timeliness_validation_for attr_names, :date
      end

      def validates_time(*attr_names)
        timeliness_validation_for attr_names, :time
      end

      def validates_datetime(*attr_names)
        timeliness_validation_for attr_names, :datetime
      end

      def timeliness_validation_for(attr_names, type)
        validates_with TimelinessValidator, _merge_attributes(attr_names).merge(:type => type)
      end
    end

  end
end

Version data entries

8 entries across 8 versions & 5 rubygems

Version Path
validates_timeliness-3.0.15 lib/validates_timeliness/helper_methods.rb
sc_core-0.0.7 test/dummy/vendor/bundle/ruby/2.2.0/gems/validates_timeliness-3.0.14/lib/validates_timeliness/helper_methods.rb
ae-validates_timeliness-4.0.0 lib/validates_timeliness/helper_methods.rb
sp-validates_timeliness-3.1.3 lib/validates_timeliness/helper_methods.rb
sp-validates_timeliness-3.1.2 lib/validates_timeliness/helper_methods.rb
jc-validates_timeliness-3.1.1 lib/validates_timeliness/helper_methods.rb
jc-validates_timeliness-3.1.0 lib/validates_timeliness/helper_methods.rb
validates_timeliness-3.0.14 lib/validates_timeliness/helper_methods.rb