On Jun 6, 4:34 pm, Jeweller <jiangna...@gmail.com> wrote:
>
>
> so I placed this line in the home.html.erb  to test
> <%= @feed_items.first.comments.first.commenter.name %>
> it's worked!
>
> I'm very confused. I mean what's the difference between these two
> ways?  And also the error message, it's very strange. because I've
> specified utf-8 encoding in the database.yml

Well the main difference is that this is only displaying a single
name. If for example there is a comment where comment.commenter is nil
then calling .name on it would raise an error but your second example
would be ok unless the bad comment happens to be the first comment of
the first item.

I think the actual error message you get is something unrelated
happening during the process of preparing the error page. Does the
path to your rails app contain some non ASCII characters perhaps?

Fred.

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to