unread icon indicating copy to clipboard operation
unread copied to clipboard

Handle unread records and mark them as read with Ruby on Rails

Results 20 unread issues
Sort by recently updated
recently updated
newest added

This PR optimizes `.mark_as_read!` to be roughly one query for collections and for relations. Implements > Partly done by #93 - an optimized "one query" solution for scopes is still...

In my view I have the following line of code: `chat.messages.unread_by(@current_identity).length` However this results into the following error: ``` ActionView::Template::Error (PG::UndefinedFunction: ERROR: operator does not exist: integer = uuid LINE...

I am facing "wrong number of arguments (given 1, expected 0)" issue while using acts_as_reader in the User model on saving the user like user.save!

When I try to mark a post as read I get this error message from the rails console. `post2.mark_as_read! for: current_user` ``` Traceback (most recent call last): 1: from (irb):6...

I noticed that doing `mark_ass_read! :all, for: current_user` does not work, but `mark_as_read! for: current_user` works fine. I'm not sure if i'm doing anything wrong, but when i run it,...

Hey! I have the following models ``` class User < ApplicationRecord acts_as_reader end ``` ``` class Conversation < ApplicationRecord has_many :comments, dependent: :destroy, as: :commentable acts_as_readable on: :created_at end ```...

I saw the author wrote `Hint: You should add a database index on messages.created_at.`, which I've tried but performance is still very very slow right now. Maybe i'm misunderstanding it....

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`...

Currently there is only a .unread? method which means to determine if something is read you need to do !thing.unread(current_user). Would it be a good idea to add a .read?(current_user)...

I'm noticing in development ReadMark.readable_classes is nil. It's not till I made a related call that it got defined with User as a readable type. ``` ReadMark.readable_classes => nil User.first.have_read?(Article.last)...