Parent

Methods

Class/Module Index [+]

Quicksearch

Mongoid::Errors::InvalidTime

This exception is raised when a bad value is attempted to be converted to a date or time.

Attributes

klass[R]
value[R]

Public Class Methods

new(value) click to toggle source

Create the new invalid date error.

@example Create the new invalid date error.

InvalidTime.new("this is not a time")

@param [ Object ] value The value that was attempted.

@since 2.3.1

# File lib/mongoid/errors/invalid_time.rb, line 18
def initialize(value)
  @value = value
  super(translate("invalid_time", { :value => value }))
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.