I agree it is better there and I initially tried to put it there, however it causes devise to no longer treat it as a boolean since I cannot specify the data type when it is in a nested hash. It also caused an issue where for some reason it would clear out all the selected_measure_ids every time the user updated their preferences. I chose to do it this way because it seemed to be more of the way devise was designed to handle such a thing. The closest I got to it working with the value nested in the preferences field was as follows:

    <%= f.fields_for :preferences do |t| %>
      <li>
        <label for="tin">Mask PHI Data:</label>
        <%= t.check_box :mask_phi_data, {:checked => resource.preferences['mask_phi_data']=="1"} %>
      </li>
    <% end %>

however this caused mask_phi_data to always have to be a string equal to either 1 or 0 and would clear the selected_measure_ids every time the user updated their preferences.