oncise Ruby conditional. Not liking this shorthand is not
> cause for some even more obscure render option.
>
> The ticket was set to "wontfix" already. If you like the feature,
> please pursue it as a plugin.
>
> Best,
> jeremy
>
> On Mon, Sep 14, 2009 at 3:35 AM, rou
quot;no_post" %>
>
> And soon you'll be able to do:
>
> <%= render @posts or render 'no_post' %>
>
> Which is about as concise as one could want!
>
> On 12-Sep-09, at 6:12 AM, Jeremy Kemper wrote:
>
>
>
> > On Fri, Sep 11, 2009 at 2:20 PM
> -Trek
>
> On Fri, Sep 11, 2009 at 8:05 PM, Jason King wrote:
>
> > I like the concept, not the name. Can I suggest something like:
>
> > render :partial => "post", :collection => @posts, :if_nil => "no_post"
>
> > ??
>
> >
Hi,
Until now with Rails when we would handle empty collections in apps,
we had to code it like that :
<%# app/views/posts/index.erb %>
<% if @posts.empty? %>
Sorry, there is no posts yet !
<% else %>
<% render :partial => "post", :collection => @posts %>
<% end %
Now with my modest contribu