Hi all,
I am using partial:
<%= render :partial => ‘post’, :collection => @posts %>
_post.rhtml
<%= post.created_at %>
. .this will display my last 4 posts next to each other, but each of this
Any help would be most welcome.
Cheers P.
Hi all,
I am using partial:
<%= render :partial => ‘post’, :collection => @posts %>
_post.rhtml
<%= post.created_at %>
. .this will display my last 4 posts next to each other, but each of this
Any help would be most welcome.
Cheers P.
On Fri, Jan 16, 2009 at 1:47 PM, Petr B.
[email protected] wrote:
Hi all,
I am using partial:
<%= render :partial => ‘post’, :collection => @posts %>_post.rhtml
<%= post.created_at %>
You can use the last method of Array to figure out if you’re on the last
post
<% if post == @posts.last -%>
<% if post == @posts.last -%>
Hi Franz,
works like a charm! Thank you.
P.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs