I've been playing with JQuery Mobile and Rails and I had a problem with a checkbox not working properly. The checkbox would render properly but wouldn't update my model. My checkbox was rendered within the erb template with the following snippet…

<p><code><br/>
<div data-role="fieldcontain">
<fieldset data-role="controlgroup">
<%= f.label :interviewer %>
<%= f.check_box :interviewer %>
</fieldset><br/>
</div><br/></code></p>

It turns out i had the label and checkbox in the incorrect order.

<div data-role="fieldcontain">
<fieldset data-role="controlgroup">
<%= f.check_box :interviewer %>
<%= f.label :interviewer %>
</fieldset>
</div>
Why, I haven't bothered to figure it out, but it's working now and as i didn't find anything on google about this problem, i'm posting this entry.