Displaying 1 result from an estimated 1 matches for "end_ip_integ".
Did you mean:
  end_ip_integer
  
2008 Mar 30
3
Bignums, integers and migrations
....up
    require ''ipaddr''
    @ips = GeoIpDatabase.find(:all)
    @ips.each do |ip|
      start_ip = IPAddr.new(ip.start_ip)
      end_ip = IPAddr.new(ip.end_ip)
      new_ip = Ip.new( :start_ip => start_ip.to_s, :end_ip =>
end_ip.to_s, :start_ip_integer => start_ip.to_i, :end_ip_integer =>
end_ip.to_i )
      new_ip.save
    end
  end
I''m using MySQL, with the integer-columns migrated as, yes, integers ;)
Anyone know of a workaround?
Thanks!
-- 
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message b...