Skip to content

Commit

Permalink
Add explicit primary key declaration for changeset subscriptions
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tomhughes committed Jun 6, 2017
1 parent 0767327 commit fb4ea1a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/models/diary_entry_subscription.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
class DiaryEntrySubscription < ActiveRecord::Base
self.primary_keys = "user_id", "diary_entry_id"

belongs_to :user
belongs_to :diary_entry
end

0 comments on commit fb4ea1a

Please sign in to comment.