Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Weird error when delivering mail : undefined method `index' for 2011-09-09 22:15:28 +0200:Time

When I deliver emails I get this weird error :

 Failure/Error: publication = FactoryGirl.create(:publication, :author => author)
 NoMethodError:
   undefined method `index' for 2011-09-09 22:15:28 +0200:Time

And the stack trace is not of any help.

Any idea ?

like image 255
Jeremy F. Avatar asked Sep 09 '11 20:09

Jeremy F.


1 Answers

Very simple, you should NOT use :

default :sent_on => Time.now

in your mailer class.

Was tricky though :)

like image 77
Jeremy F. Avatar answered Oct 21 '22 03:10

Jeremy F.