small medium large xlarge

16 Jun 2008, 05:30
Charles Harvey (5 posts)

Hi Mike-

Thanks for a great book. I have been using the beta book for a fewmonths and am happy to have my hard copy now.

Is there a way to eliminate nil errors in a dry way?

You have a nil object when you didn’t expect it! The error occurred while evaluating nil.strftime

I know I can do something like <%= order.placed_at.to_s(:chatty) unless order.nil? %>

to eliminate the problem in the date_time_format.rb or somewhere else so it is dry. Any ideas?

Best Regards-


You must be logged in to comment