Hello,  i got some strange behaviour here in my app i cannot work out.
Maybe here someone knows a soloution for this?
In the view:

<% @product.comments.each do |comment| %>
   <div class="comment">
     <p><%= comment.created_at.to_s(:db) %></p>
  </div>
<% end %>

So the error i get is: wrong number of arguments (1 for 0) for the
to_s(:db)
When i ask the object comment.created_at.class what class it is, it
gives me:  ActiveSupport::TimeWithZone
In the console i can take this object and use the to_s(:format) method
on it. Only in the view it is not working. Does anybody know a
solution to this?
I use Rails 3.0 here with MySQL as DB.

Thanks in advance,
Andreas

-- 
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to