Add explicit primary key declaration for changeset subscriptions
This table has a composite primary key and although we don't really rely on that at all rails 5.0 warns about itif you don't explcitly declare it in order to trigger the CPK extension.
This commit is contained in:
parent
07673278f1
commit
fb4ea1a02a
1 changed files with 2 additions and 0 deletions
|
@ -1,4 +1,6 @@
|
|||
class DiaryEntrySubscription < ActiveRecord::Base
|
||||
self.primary_keys = "user_id", "diary_entry_id"
|
||||
|
||||
belongs_to :user
|
||||
belongs_to :diary_entry
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue