 <p>I'm not sure if you can do this in Ruby, but doing it like this in Jquery may work. However you should definitely fix the databases.</p> <pre><code>$(document).ready(function() { //On document ready $("form").find('input').each(function(){ //find all inputs in forms if ($(this).val() == "(NULL)") { //if the value of an input is "(NULL)" $(this).val(""); //Set it to "" } }) }) </code></pre>