Unread

screenshot of Unread
rails

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

Overview

The UnreadRuby gem offers a streamlined way to manage the read and unread statuses of ActiveRecord objects in your Rails applications. Whether you are dealing with messages, documents, or comments, this gem ensures that users can easily track what they have read and what remains unread. Built for performance, it executes efficiently and integrates seamlessly with Rails versions 6.1 and newer.

With minimal requirements, including just one additional database table, UnreadRuby makes it straightforward for developers to implement unread tracking across various models. Its primary goal is to maintain high performance while keeping the management of unread records simple and effective.

Features

  • Manage Unread Records: Effortlessly track unread statuses for any ActiveRecord objects such as messages and comments, making user interaction more intuitive.
  • Mark as Read: Allow users to mark individual records as read quickly, improving the user experience by focusing on specific items.
  • Mark All as Read: A single action enables users to mark all records as read, drastically reducing clutter and enhancing efficiency.
  • Scope for Unread Records: Provides a dedicated scope to retrieve all unread records for a specified reader, ensuring accurate tracking.
  • Lightweight Database Footprint: Requires only one additional database table, simplifying setup without burdening your existing database architecture.
  • Optimized for Performance: Designed to handle large data sets, the gem maintains quick access and management speed, even with extensive user activity.
  • Automatic Cleanup: Includes a feature that cleans up old and unnecessary entries from the unread list, preventing overheard and keeping it manageable.
  • Compatibility: Works with Ruby 3.1 and newer, and supports major databases like MySQL, PostgreSQL, and SQLite, making it a versatile choice for various projects.
rails
Ruby on Rails

Ruby on Rails, often referred to as Rails, is an open-source web application framework written in Ruby. Known for its convention over configuration and don't repeat yourself (DRY) principles, Rails simplifies and accelerates the development of database-backed web applications.