]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/node_tag.rb
Create invalid_char validators and apply to models
[rails.git] / app / models / node_tag.rb
index 20065b993137f8e1df485c24c81d716371c062ae..d1e80059232980373c6b1c18daeb10db458e7a4d 100644 (file)
@@ -2,7 +2,7 @@
 #
 # Table name: current_node_tags
 #
 #
 # Table name: current_node_tags
 #
-#  node_id :integer          not null, primary key
+#  node_id :bigint(8)        not null, primary key
 #  k       :string           default(""), not null, primary key
 #  v       :string           default(""), not null
 #
 #  k       :string           default(""), not null, primary key
 #  v       :string           default(""), not null
 #
@@ -18,6 +18,6 @@ class NodeTag < ActiveRecord::Base
   belongs_to :node
 
   validates :node, :presence => true, :associated => true
   belongs_to :node
 
   validates :node, :presence => true, :associated => true
-  validates :k, :v, :allow_blank => true, :length => { :maximum => 255 }
+  validates :k, :v, :allow_blank => true, :length => { :maximum => 255 }, :invalid_chars => true
   validates :k, :uniqueness => { :scope => :node_id }
 end
   validates :k, :uniqueness => { :scope => :node_id }
 end