[typo] "recent comments"
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
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):
<% for comment in Comment.find(:all, :limit => 7, :order => 'id DESC' )
<%= link_to truncate(comment.body, 30), :controller => "comments",
:action => "show", :id => comment.id, :article_id => comment.article_id
by <%= truncate(comment.author, 20) %><br />
<%= time_ago_in_words(comment.created_at) %> ago
<% end %>
any help would be greatly appreciated..
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
> I am not sure I can do it for you here, but I think you need to just
> <%= render_recent_comments %>
> to the articles layout. This will use the _recent_comments.rhtml code.
> Typo-list mailing list
> Typo-list at rubyforge.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 1737 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/typo-list/attachments/20050620/83027d08/attachment.bin
More information about the Typo-list