You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have various subscription models, such as NoteSubscription and DiaryEntrySubscription. We also have a table "changeset_subscribers" which does the same thing (pairs of user_id/object_id), but we don't have a corresponding model. Instead we declare it as a join association in Changesets, and use custom methods on the changeset model (e.g. changeset.subscribe(user)) to indirectly add and remove the rows in that table.
I think it would be worth refactoring this code, to make subscriptions behave the same way across all three models. So we should
Create a ChangesetSubscription model, although it will need self.table_name = "changeset_subscribers"
Refactor changeset_subscriptions_controller to use the ChangesetSubscription model, likely through changeset.subscriptions.new
Remove the subscribe/unsubscribe methods from the Changeset model, since these aren't acting on the Changeset model itself.
The text was updated successfully, but these errors were encountered:
We have various subscription models, such as NoteSubscription and DiaryEntrySubscription. We also have a table "changeset_subscribers" which does the same thing (pairs of user_id/object_id), but we don't have a corresponding model. Instead we declare it as a join association in Changesets, and use custom methods on the changeset model (e.g.
changeset.subscribe(user)
) to indirectly add and remove the rows in that table.I think it would be worth refactoring this code, to make subscriptions behave the same way across all three models. So we should
self.table_name = "changeset_subscribers"
changeset_subscriptions_controller
to use the ChangesetSubscription model, likely through changeset.subscriptions.newThe text was updated successfully, but these errors were encountered: