1 # == Schema Information
3 # Table name: changeset_tags
5 # changeset_id :bigint(8) not null, primary key
6 # k :string default(""), not null, primary key
7 # v :string default(""), not null
11 # changeset_tags_id_idx (changeset_id)
15 # changeset_tags_id_fkey (changeset_id => changesets.id)
18 class ChangesetTag < ActiveRecord::Base
19 self.primary_keys = "changeset_id", "k"
23 validates :changeset, :presence => true, :associated => true
24 validates :k, :v, :allow_blank => true, :length => { :maximum => 255 }, :invalid_chars => true
25 validates :k, :uniqueness => { :scope => :changeset_id }