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
If exist class:
class A end class B < A acts_as_readable :on => :created_at end
Then use it like here:
b = B.create! b.mark_as_read! for => user b.unread?(user) # It will return a unexpected result
The text was updated successfully, but these errors were encountered:
What do you mean with "unexpected"?
BTW: Your change breaks the tests.
Sorry, something went wrong.
b.unread?(user) # Should be false, But return true
After call mark_as_read!,
<ReadMark id: 1, readable_id: 1, reader_id: 1, readable_type: "A", timestamp: nil, reader_type: "User">
This record has been created in the db, But call b.unread?(user), the sql:
SELECT 1 AS one FROM "bs" LEFT JOIN "read_marks" ON "read_marks".readable_type = 'B' AND "read_marks".readable_id = "bs"."id" AND "read_marks".reader_id = 1 AND "read_marks".reader_type = 'User' AND "read_marks".timestamp >= "bs"."created_at" WHERE ("read_marks".id IS NULL AND "bs"."created_at" > '2016-04-24 05:35:16.989270') AND "bs"."id" = 1 LIMIT 1
@tangopium: This issue belongs to code from #68. Do you have an idea?
No branches or pull requests
If exist class:
Then use it like here:
The text was updated successfully, but these errors were encountered: