[Rails-core] Re: #3187 : Handle "blank slate" more easily with render method thanks to :default_template option

2009-09-14 Thread rouffj
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

[Rails-core] Re: #3187 : Handle "blank slate" more easily with render method thanks to :default_template option

2009-09-14 Thread rouffj
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

[Rails-core] Re: #3187 : Handle "blank slate" more easily with render method thanks to :default_template option

2009-09-12 Thread rouffj
> -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" > > > ?? > > >

[Rails-core] #3187 : Handle "blank slate" more easily with render method thanks to :default_template option

2009-09-11 Thread rouffj
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