1 # == Schema Information
3 # Table name: current_node_tags
5 # node_id :bigint(8) not null, primary key
6 # k :string default(""), not null, primary key
7 # v :string default(""), not null
11 # current_node_tags_id_fkey (node_id => current_nodes.id)
14 class NodeTag < ApplicationRecord
15 self.table_name = "current_node_tags"
16 self.primary_keys = "node_id", "k"
20 validates :node, :presence => true, :associated => true
21 validates :k, :v, :allow_blank => true, :length => { :maximum => 255 }, :characters => true
22 validates :k, :uniqueness => { :scope => :node_id }