-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
fix: ActionView::Template::Error: Couldn't find User #3321
base: master
Are you sure you want to change the base?
Conversation
cc @tachyons, kindly review |
has_noticed_notifications model_name: "NoticedNotification" | ||
has_many :noticed_notifications, as: :recipient, dependent: :destroy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need both lines ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes,
According to the noticed
doc has_noticed_notifications
should cover that edge, but I tested it for the project as well, it is giving unexpected results. So we can move ahead with the standard association method for now.
db/data_migrations/20221016052333_destroy_notifications_for_non_existing_notifier_user.rb
Outdated
Show resolved
Hide resolved
…n_existing_notifier_user.rb Co-authored-by: Aboobacker MK <aboobackervyd@gmail.com>
An error occurred when fetching issues. View more on Code Climate. |
Fixes #3317
Describe the changes you have made in this PR -
data migration
noticed_notification
association with user.Screenshots of the changes (If any) -
Note: Please check Allow edits from maintainers. if you would like us to assist in the PR.