title: ActiveRecord Integer Column won't accept some Integer assignments
body: <p>I'm seeing some genuinely bizarre behavior w/ ActiveRecord as it relates to assignment.  I have an ActiveRecord model named <strong>Venue</strong> that includes the measurements of the Venue, all integers less than 1K. We add Venues via an XML feed. On the model itself, I have a <code>Venue.from_xml_feed</code> method takes the XML, parses, and creates Venues.</p>
  
  <p>The problem comes from the measurements.  Using <code>Nokogiri</code>, I'm parsing out the measurements like so:</p>
  
  <pre><code>   elems = xml.xpath("//*[@id]")
     elems.each do |node|
        distance = node.css("distances")
        rs = distance.attr("rs")
        // get the rest of the sides
        # using new instead of create to print right_side, behavior is the same
        venue = Venue.new right_side: rs # etc
        venue.save
        puts venue.right_side
     end
  </code></pre>
  
  <p>The problem is that <code>venue.right_side</code> <strong>ALWAYS</strong> evaluates to <code>nil</code>, even though <code>distance.attr("rs")</code> contains a legal value, say 400. So this code:</p>
  
  <pre><code>rs = distance.attr("rs")
  puts rs
  Venue.new right_side: rs
  </code></pre>
  
  <p>Will print <code>400</code>, then save rs as nil.  If I try any type of Type Conversions, like so:</p>
  
  <pre><code>content = distance.attr("rs").content
  str     = content.to_s
  int     = Integer(str)
  puts "Is int and Integer? #{int.is_a? Integer}"
  Venue.new right_side: int
  </code></pre>
  
  <p>It will print <code>Is int an Integer? true</code>, then again save again save <code>Venue.right_side</code> as <code>nil</code>.  </p>
  
  <p>However, if I just explicitly create a random integer like so:</p>
  
  <pre><code>int = 400
  Venue.new right_side: int
  </code></pre>
  
  <p>It will save <code>Venue.right_side</code> as <code>400</code>.  Can anyone tell me what's going on with this?</p>