Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Ryan Bates's latest activity

Saturday, August 16 2008
847 Pass block args for render :layout was updated in Ruby on Rails
  • Ryan Bates
    Ryan Bates commented at 8:46 PM

    thanks, documentation is planned, just wanted to nail down the functionality first.

  • Ryan Bates
    Ryan Bates commented at 7:14 PM

    Also, you could get fancy and yield multiple times for different sections of the layout. For example.

    
    <!-- _comment.html.erb -->
    before
    <%= yield comment, :ti...
  • Ryan Bates
    Ryan Bates created the ticket at 6:58 PM

    Currently it's possible to pass a block to "render :layout" in the view and yield to it. For example:

    
    <!-- _layout.html.erb -->
    before
    <%= yield %>
    end
    
    <!-- ...
785 Caching models fails in development was updated in Ruby on Rails
  • Ryan Bates
    Ryan Bates commented at 12:58 AM

    After a little bit of research I found this commit which appears to be when those two lines were added.

    As suspected, this was intended to solve a memory leak....

  • Ryan Bates
    Ryan Bates commented at 12:05 AM

    Is it possible the two lines were intended to solve a memory leak? That may explain why it doesn't make a noticeable change in behavior. It's a bit beyond me, b...

Friday, August 15 2008
842 PATCH: ActiveRecord::Reflection cannot be compared with nil was updated in Ruby on Rails
  • Ryan Bates
    Ryan Bates commented at 9:53 PM

    It's probably best to fix this for other objects as well.

    
    reflection == Object.new # raises an error
    

    Attached is a patch which ensures the object is a reflec...

791 Add empty_template option when rendering a collection was updated in Ruby on Rails
  • Ryan Bates
    Ryan Bates commented at 7:08 PM

    Nevermind, found the problem. Attached is an updated patch which also returns nil when nil is passed.

  • Ryan Bates
    Ryan Bates commented at 6:39 PM

    @RSL, as Damian mentioned you can toss it into a helper. Or you can just render a partial right here.

    
    <%= render(:partial => @records) || render(:partial => '...
  • Ryan Bates
    Ryan Bates commented at 4:49 PM

    Correction: you'll need to wrap the render call in parenthesis.

    
    <%= render(:partial => @records) || "Nothing found" %>
    
785 Caching models fails in development was updated in Ruby on Rails
  • Ryan Bates
    Ryan Bates commented at 4:59 PM

    @jshumate, sorry for the incorrect assumption. I haven't seen this behavior outside of storing a model globally. Could you post your code or example app somewhe...