1 # == Schema Information
3 # Table name: user_preferences
5 # user_id :integer not null, primary key
6 # k :string not null, primary key
11 # user_preferences_user_id_fkey (user_id => users.id)
14 class UserPreference < ActiveRecord::Base
15 self.primary_keys = "user_id", "k"
19 validates :user, :presence => true, :associated => true
20 validates :k, :v, :length => 1..255, :invalid_chars => true
22 # Turn this Node in to an XML Node without the <osm> wrapper.
24 el1 = XML::Node.new "preference"