Displaying 2 results from an estimated 2 matches for "comment_author".
2006 Dec 20
4
undefined method `fullname' for #<User:0x357e380>, BUT works on first view?
...<h2>Comments</h2>
<div class="comment_title">
<%= comment.title -%>
</div>
<div class="comment.text">
<%= h comment.comment -%>
</div>
<div class="comment_author">
<%= comment.user.fullname -%> <%=
time_ago_in_words(comment.created_at) -%> ago
</div>
<hr>
</div>
As you can see, the comments partial calls comment.user.fullname, which
is defined in the UserModel:
class User < ActiveRec...
2006 Apr 07
3
Ajax render a template
In my blog a user can add comments. I want an Ajax call to add the
comment to the bottom of the comments list.
How to i return a comment thats is in the comment template and add it to
the bottom of the page. I have gotten as far as rendering some text
back to the form and the comment doesn''t display until i refresh.
This is my _newcomment.rhtml form to create a new comment
<div