-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rename subscriptions to notification_subscriptions #161
Comments
Hi @apuntovanini I think your suggestion make sense. We probably should allow subscriber model to define the name of the association. But I'm not sure how we reproduce this issue and how we confirm if it resolved. Can you create simple test case for this issue? |
Hello @simukappu! |
Hi @apuntovanini |
Sure thing, in the fork master branch I already migrated tests and methods to the new naming (would be a breaking che change tough). If you want I can draft a PR and see if that works for you |
@apuntovanini If you could draft a PR, it would be helpful. Can you create it? |
Sure, did you take a look at https://github.com/uidu-org/activity_notification? I renamed the association there, fixed the tests, but couldn't make it configurable. I'll open a PR so you can take a look! |
Thank you for your PR. I've checked it. I understand the issue and request, but it seems to be difficult to make this subscription association name configurable. The changes of this association name and method name will be breaking changes for current working applications with this gem. |
Problem or use case
Out target model has already associations with subscriptions, subscriber.rb uses same name to access notifications to which a target is subscribed to. This create an overlap between the associations, and fails.
Expected solution
I'd probably suggest to rename notification subscriptions association to notification_subscriptions, or to allow clients to define the name of the association
Alternatives
None
What do you think @simukappu
The text was updated successfully, but these errors were encountered: