Argument out of range, rails 4.2.1 (date type)


I’ve just started rails 4.2.1 and i created a model

And i ran “foo”) # false

also 200.to_s) #false ‘200’) # false 200) # ArgumentError: argument out of range 2000.to_s) # ArgumentError: argument out of range

Not sure, but is it a bug ?

Without knowing what type is your start_date of, I suppose it should be date. Your are trying to pass in a String instead.
Another question is about validation. may be you have some validation rules on start_date attribute in your Auction model ad it fails to pass the validation, that’s why you get ‘false’ in return.
Post some more details (start_date attribute type, validations to be applied, etc.) about your model to be able to help you.