Ruby on Rails Tuesday, March 29, 2011

ok, so I'm displaying a list of recipes and want the created_at to be
displayed with distance_of_time_in_words_to_now function.

I did it and it worked until just recently. It stopped working around
the time we chagned the mysql gem to the mysl2 gem (possibly not
related).

Anyway my code line in the view is:

<%= distance_of_time_in_words_to_now(recipe.created_at) %>

as i said that worked and hasn't been changed since it was last
working.

the error I'm getting is:

NoMethodError in Recipes#index

Showing E:/Documents/Websites/nutrition-calculator/trunk/app/views/
recipes/_recipes_partial.html.erb where line #16 raised:

undefined method `abs' for 2011-03-29 15:31:47 +0800:Time

Any ideas as to what's going on here?

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment