frodefi/rails-messaging

Undefined method 'read' for MessagingUser

shawno opened this issue · 3 comments

It seems messaging isn't updated to reflect the mailboxer 0.8.0 API.

from https://github.com/ging/mailboxer#warning-for-version-080

"Version 0.8.0 sees Messageable#read and Messageable#unread renamed to mark_as_(un)read, and Receipt#read and Receipt#unread to is_(un)read. This may break existing applications, but read is a reserved name for Active Record, and the best pratice in this case is simply avoid using it."

Getting the same error how to fix it?

I abandoned this and built something from scratch, sorry for the bad news.

As a fix for this:

def read(args)
  mark_as_read(*args)
end

def unread(args)
  mark_as_unread(*args)
end