Aug 14
I’ve just been getting autotest (part of the ZenTest suite) to work. It’s a really good framework for just getting your tests to run automatically in the background.
Following the instructions in one of the fantastic PeepCode screencasts I got the notifications from autotest to get piped though to Growl
In the PeepCode Episode there’s a link to to Wincent Colaiuta’s knowledge base on how to do this. However, it would seem that the formatting of the RSpec output has changed since this ~/.autotest file was written. “Not implemented” strings have changed to “Pending”
Read more »
Aug 08
I submitted my first patch to Rails yesterday. I found that if you render a partial with a layout before you call yield in your site layout, the value that is returned by yield is whatever was rendered by your partial (without it’s layout) and not the rendered action as expected.
This is because the requested action is rendered before it’s layout, then stored in @content_for_layout (in the ActionView object). When render :partial => ‘blah’, :layout => ‘my_layout’ is called it stores it’s value in, you guessed it, @content_for_layout, thus overwriting the rendered action with the rendered partial. Thus, when you call yield from your site layout, the last partial rendered with layout (just the partial bit though) will always be returned.
The patch creates a copy of the current @content_for_layout before doing a render, then sets it back to its original value once the render has completed. It doesn’t seem to appear on the main ticket listing page though, I’m not sure why.
Aug 08
I’ve been working for OpenAdvantage since December 2003 and I’ve thoroughly enjoyed my time here. Unfortunately the funding has come to an end. So from the end of September I will be out of a job :(.
We had another bid into Advantage West Midlands to continue our work with the National Open Centre, but unfortunately due to the recent change in Prime Minister most public spending has been stopped for re-evaluation. So as far as AWM are concerned there is no money available to fund our project.
Read more »