X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/5449cf4adcc1fad4b9f43426e6d3e4a8f65e6fbb..3e180e745c0787aa1d2f1665a12d0378c8816aa7:/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