]> git.openstreetmap.org Git - rails.git/blob - app/models/user_preference.rb
Fix redirection to wiki when terms are declined
[rails.git] / app / models / user_preference.rb
1 # == Schema Information
2 #
3 # Table name: user_preferences
4 #
5 #  user_id :bigint(8)        not null, primary key
6 #  k       :string           not null, primary key
7 #  v       :string           not null
8 #
9 # Foreign Keys
10 #
11 #  user_preferences_user_id_fkey  (user_id => users.id)
12 #
13
14 class UserPreference < ApplicationRecord
15   self.primary_keys = "user_id", "k"
16
17   belongs_to :user
18
19   validates :user, :associated => true
20   validates :k, :v, :length => 1..255, :characters => true
21 end