ledermann / unread

Handle unread records and mark them as read with Ruby on Rails
MIT License
739 stars 121 forks source link

Problem in usage examples #85

Open saneef opened 7 years ago

saneef commented 7 years ago

Currently, when a new user(reader) is created, all messages (readables) created before that point in time will be marked as read. It can only be disabled by overriding the setup_new_reader function in the reader.

So the in the example have_not_read method should ideally return empty.

## Get users that have not read a given message
user1 = User.create!
user2 = User.create!

User.have_not_read(message1)
# => [ user1, user2 ]
ishields commented 4 years ago

Yes this was very confusing. Took me a while to track down setup_new_reader since it's not documented in the readme.

iamnader commented 3 years ago

just ran into this as well. would be great to document!