We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hey guys,
We're having the following issue: If the reader has default_scope defined, running mark_as_read! on readable will raise an exception:
default_scope
mark_as_read!
ActiveRecord::RecordInvalid: Validation failed: Reader must exist
This is happening as belongs_to definition of the ReadMark needs to specify optional: true while it doesn't.
belongs_to
ReadMark
optional: true
Thank you, Kon.
The text was updated successfully, but these errors were encountered:
Added optional: true to read_marks [Fixes ledermann#120]
2c4ec96
Added specs for the optional reader case [Fixes ledermann#120]
da17063
0f1b242
Added optional: true to reader's belongs_to [Fixes ledermann#120] (le…
e045523
…dermann#121) * Added optional: true to read_marks [Fixes ledermann#120] * Added specs for the optional reader case [Fixes ledermann#120]
No branches or pull requests
Hey guys,
We're having the following issue:
If the reader has
default_scope
defined, runningmark_as_read!
on readable will raise an exception:This is happening as
belongs_to
definition of theReadMark
needs to specifyoptional: true
while it doesn't.Thank you,
Kon.
The text was updated successfully, but these errors were encountered: