I updated the gist with additional information:
http://gist.github.com/396679
I'm still drilling down into this but the problem is happening inside
the erubis gem when the template is parsed.
When the variable name is 'todx' the output includes:
@output_buffer.safe_concat('</td>\n <td>');
@output_buffer.append= ( link_to 'Show', todx );
@output_buffer.safe_concat('</td>\n <td>');
But when the variable name is 'todo' the output is:
@output_buffer.safe_concat('</td>\n <td>');
@output_buffer.append= link_to 'Show', todo
@output_buffer.safe_concat('</td>\n <td>');
It's mangled; I wonder if it's matching "do" somewhere?