]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/node.rb
Fix numericality validation to use correct integer only constraint
[rails.git] / app / models / node.rb
index be561fb5daa3eb15b30c9810d02d9aee5aa4eda2..c5df1f79e5959c3c3826b0685bf4fd0b2a71d2bd 100644 (file)
@@ -2,14 +2,14 @@
 #
 # Table name: current_nodes
 #
-#  id           :integer          not null, primary key
+#  id           :bigint(8)        not null, primary key
 #  latitude     :integer          not null
 #  longitude    :integer          not null
-#  changeset_id :integer          not null
+#  changeset_id :bigint(8)        not null
 #  visible      :boolean          not null
 #  timestamp    :datetime         not null
-#  tile         :integer          not null
-#  version      :integer          not null
+#  tile         :bigint(8)        not null
+#  version      :bigint(8)        not null
 #
 # Indexes
 #
@@ -47,15 +47,15 @@ class Node < ActiveRecord::Base
   has_many :containing_relations, :class_name => "Relation", :through => :containing_relation_members, :source => :relation
 
   validates :id, :uniqueness => true, :presence => { :on => :update },
-                 :numericality => { :on => :update, :integer_only => true }
+                 :numericality => { :on => :update, :only_integer => true }
   validates :version, :presence => true,
-                      :numericality => { :integer_only => true }
+                      :numericality => { :only_integer => true }
   validates :changeset_id, :presence => true,
-                           :numericality => { :integer_only => true }
+                           :numericality => { :only_integer => true }
   validates :latitude, :presence => true,
-                       :numericality => { :integer_only => true }
+                       :numericality => { :only_integer => true }
   validates :longitude, :presence => true,
-                        :numericality => { :integer_only => true }
+                        :numericality => { :only_integer => true }
   validates :timestamp, :presence => true
   validates :changeset, :associated => true
   validates :visible, :inclusion => [true, false]