Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Gems
  3. public_activity

public_activity

MITRubyv3.0.2

A Ruby gem for tracking model changes and creating activity feeds in Rails applications, similar to GitHub's public activity.

GitHubGitHub
3.0k stars331 forks0 contributors

What is public_activity?

PublicActivity is a Ruby gem that provides easy activity tracking for ActiveRecord, Mongoid, and MongoMapper models in Rails 6.1+. It records model changes and allows developers to present those activities to users in a feed format, similar to how GitHub displays public activity.

Target Audience

Rails developers building applications that need to track and display user activities, such as social networks, project management tools, or content platforms with activity feeds.

Value Proposition

Developers choose PublicActivity for its convention-over-configuration approach, multi-ORM support, and built-in view helpers, making it simple to add activity tracking without extensive custom code.

Overview

Easy activity tracking for models - similar to Github's Public Activity

Use Cases

Best For

  • Adding activity feeds to Rails applications, like user notifications or timelines.
  • Tracking CRUD operations on models for auditing or user visibility.
  • Building custom activity types beyond basic create, update, and destroy actions.
  • Supporting multiple databases (ActiveRecord, Mongoid, MongoMapper) in a single gem.
  • Internationalizing activity text with I18n translations and fallbacks.
  • Testing activity tracking in isolation with provided RSpec utilities.

Not Ideal For

  • Applications requiring real-time, push-based notifications without additional setup
  • Projects using ORMs outside ActiveRecord, Mongoid 3, or MongoMapper (e.g., Sequel or newer Mongoid versions)
  • Systems with extreme scalability needs for activity logging, where database bloat could become a performance issue

Pros & Cons

Pros

Multi-ORM Flexibility

Supports ActiveRecord, Mongoid, and MongoMapper out of the box, allowing seamless integration with various database backends without code changes, as shown in the initializer setup examples.

Convention-over-Configuration Simplicity

Minimal setup required—just include 'tracked' in models to automatically record CRUD activities, reducing boilerplate and speeding up implementation for basic use cases.

Custom Activity Support

Enables creation of custom activity types beyond CRUD using 'create_activity' with custom keys, making it adaptable for complex workflows like social interactions or custom events.

Built-in View Helpers

Provides 'render_activities' helper with layout and locals support, simplifying activity display in views and offering I18n fallbacks for easy internationalization.

Testing Utilities

Includes RSpec helpers to enable/disable tracking during tests, facilitating isolated testing environments without interference, as documented in the testing section.

Cons

Limited ORM and Version Support

Only supports specific ORMs like Mongoid 3 (not newer versions) and Rails 6.1+, with issues on older versions closed without resolution, hindering legacy project upgrades.

Database Performance Concerns

Automatically recording all CRUD activities can rapidly grow the activities table, potentially impacting database performance without manual optimization or archiving strategies.

Setup Complexity for Non-ActiveRecord ORMs

Requires additional initializer configuration for Mongoid or MongoMapper, adding an extra step compared to ActiveRecord's straightforward migration-based setup.

Dependency on External Documentation

Key features and common examples are documented in a separate wiki, which may be less maintained or harder to navigate than integrated documentation, increasing learning time.

Frequently Asked Questions

Quick Stats

Stars2,993
Forks331
Contributors0
Open Issues17
Last commit6 days ago
CreatedSince 2011

Tags

#mongoid#rails#activity-stream#activity-feed#ruby-gem#change-tracking#tracking#hackertoberfest#activerecord#audit-log#user-activity#ruby

Built With

R
Rails
R
Ruby
M
MongoMapper
M
Mongoid
A
ActiveRecord

Included in

Ruby14.1kGems2.8k
Auto-fetched 1 day ago

Related Projects

PaperTrailPaperTrail

Track changes to your rails models

Stars7,021
Forks910
Last commit1 month ago
FriendlyIdFriendlyId

FriendlyId is the “Swiss Army bulldozer” of slugging and permalink plugins for ActiveRecord. It allows you to create pretty URL’s and work with human-friendly strings as if they were numeric ids for ActiveRecord models.

Stars6,225
Forks589
Last commit1 month ago
AASMAASM

AASM - State machines for Ruby classes (plain Ruby, ActiveRecord, Mongoid, NoBrainer, Dynamoid)

Stars5,216
Forks648
Last commit23 days ago
ActsAsTaggableOnActsAsTaggableOn

A tagging plugin for Rails applications that allows for custom tagging along dynamic contexts.

Stars4,996
Forks1,193
Last commit3 months ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub