Monday, June 26, 2006

Ruby on Rails bug

I put this in my view:

<%= check_box_tag 'newSignon', '1'%><%=content_tag 'label', 'New user?', {'for'=>'newSignon', 'onclick'=>visual_effect(:toggle, 'newBlock')}%>

I expected this:

<input type=checkbox id="newSignon" name="newSignon" value="1"/><<abel for="newSignon" onclick="Effect.toggle('newBlock')">New user?</label>

I got this:

<input id="newSignon" name="newSignon" type="checkbox" value="1" /><label for="newSignon" onclick="new Effect.Toggle(&quot;newBlock&quot;,{});">New user?</label>

I guess it is escaping the embedded quote, but it is doing it inappropriately. I don't have time to dig through the source and fix it, but I might later.