X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/5449cf4adcc1fad4b9f43426e6d3e4a8f65e6fbb..237d2ad60dd6b6778603ad274e2f6a168aada259:/app/models/user_preference.rb diff --git a/app/models/user_preference.rb b/app/models/user_preference.rb index 28ef40f1d..b5110bbf5 100644 --- a/app/models/user_preference.rb +++ b/app/models/user_preference.rb @@ -1,5 +1,6 @@ class UserPreference < ActiveRecord::Base - set_primary_keys :user_id, :k + self.primary_keys = "user_id", "k" + belongs_to :user validates_length_of :k, :within => 1..255