[typo] "recent comments"

spiros antonopoulos spiros at souljerky.com
Mon Jun 20 00:50:17 EDT 2005


thanks... i'm on the road in india so my internet accessibility is 
super spotty and low fi so i apologize for the accidental double post 
last time...

re: i actually made a copy of recent_comments.rhtml and put it in the 
shared folder, then i used

<%= render_partial "shared/recentcomments"  %>

---

the display works but the links do not...

the recentcomments partial looks like this (basically a copy of 
recent_comments.rhtml from the admin):

<h3>recent comments</h3>
<ul class="recent">
<% for comment in Comment.find(:all, :limit => 7, :order => 'id DESC' ) 
%>
   <li>
     <%= link_to truncate(comment.body, 30), :controller => "comments", 
:action => "show", :id => comment.id, :article_id => comment.article_id 
%><br />
     by <%= truncate(comment.author, 20) %><br />
     <%= time_ago_in_words(comment.created_at) %> ago
   </li>
<% end %>
</ul>

---

any help would be greatly appreciated..

thank you!

-[s]

On Jun 20, 2005, at 3:44 AM, Heath Weaver wrote:

>
>
> On 6/19/05, spiros antonopoulos <spiros at souljerky.com> wrote:
>> Here's a super elementary programming/rails/typo question...
>>
>> How would I change a copy of the text from the admin section's "recent
>> comments" sidebar so that the links work on the front-end of the
>>  weblog?
>>
>> Thanks...
>> -[s]
>  I am not sure I can do it for you here, but I think you need to just 
> add:
>
>  <%= render_recent_comments %>
>
> to the articles layout. This will use the _recent_comments.rhtml code.
>
>  HTH
> _______________________________________________
> Typo-list mailing list
> Typo-list at rubyforge.org
> http://rubyforge.org/mailman/listinfo/typo-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 1737 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/typo-list/attachments/20050620/83027d08/attachment.bin


More information about the Typo-list mailing list