X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/bed9cd00ed166ce346da4b8a9b654ddf86e64e70..07df3f9809404084435fae270d95f1d45b5f3dd6:/app/models/user_preference.rb?ds=sidebyside 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