I must be doing something dumb, but I can’t figure this out.
The following code:
customer = Customer.new(:name => ‘Ray’, :date_created =>
Always results in the error ActiveRecord::RecordInvalid: Validation
failed: Date created can’t be null
Yet, this code works fine:
customer = Customer.new(:name => ‘Ray’)
customer.date_created = Time.now.to_s(:db)
Is there something I’m doing wrong that is preventing me from putting
everything in the new method?
Any help would be appreciated.