A collection of awesome ActiveRecord goodies, libraries, tools, extensions, guides, etc.
Note: γοΈ stands for the Gem of the Week article in the Gem of the Week Series @ Planet Ruby, π stands for the RubyGems page and stands for the GitHub page.
[ANNOUNCEMENT] Looking for awesome Ruby events (meetups, conferences, camps, etc.) from around the world)? See the Awesome Events List @ Planet Ruby.
Contributions welcome. Anything missing? Send in a pull request. Thanks.
- ActiveRecord Gem π,
- 2014: 4.2.0 (Dec/20); 4.1.0 (Apr/8) -- 2013: 4.0.0 (Jun/25) -- 2012: 3.2.0 (Jan/20) -- 2011: 3.1.0 (Aug/31) -- 2010: 3.0.0 (Aug/29) -- 2007: 2.0.0 (Dec/6) -- 2004: 1.0.0 (Oct/25)
Documentation
- RDoc @ RubyDoc.info
- Article - 20,000 Leagues Under ActiveRecord - by Pat Shaughnessy
Rails Guides Series
- Active Record Basics
- Active Record Migrations
- Active Record Validations
- Active Record Callbacks
- Active Record Associations
- Active Record Query Interface
- ActsAsList , π - extension provides the capabilities for sorting and reordering a number of objects in a list
- ranked-model , π
- ActsAsTree , π - extends ActiveRecord to add support for organizing items into parentβchildren relationships
- Ancestry , π - organise ActiveRecord model into a tree structure
- ActsAsTaggableOn , π - a tagging plugin for ActiveRecord that allows for custom tagging along dynamic contexts
- TagUtils , π - tag utilities (tag, taggings, tag list, etc.)
- Gutentag , π - a good, simple, solid tagging extension for ActiveRecord
- ByStar , π - easily and reliably query ActiveRecord objects based on time e.g. by_year, yesterday, before( Date.today )
- Season , π - automatically creates scopes for ActiveRecord date, datetime and timestamp attributes
- Groupdate , π - easily and reliably group ActiveRecord objects based on time e.g. day, week, hour of the day and more; has time zone support
- default_value_for , π - a way to specify default values for ActiveRecord models
- ActiveValidators , π - a collection of off-the-shelf ActiveRecord validations
- validates_email_format_of , π - validate e-mail addresses against RFC 2822 and RFC 3696
- Kaminari , π - a scope and engine based, clean, powerful, customizable and sophisticated paginator
- will_paginate , π - a pagination library
- order_query , π - uses no offset; finds the next or previous record(s) relative to the current one efficiently using keyset pagination, e.g. for navigation or infinite scroll
- PaperTrail , π - lets you track changes to your models' data
- Audited , π - formerly acts_as_audited; logs all changes to your Rails models
- Vestal Versions , π - keep a history of your ActiveRecord models' changes
- Espinata , π - audits activerecord models
- Auditable , π - a simple(r) auditing / version tracking library for ActiveRecord
- acts_as_versioned , π - adds simple versioning to an ActiveRecord module
- Paranoia , π - a re-implementation of acts_as_paranoid
- ActsAsParanoid , π - soft delete; hide records instead of deleting them, making them recoverable later
- PermanentRecords , π - soft-delete your ActiveRecord records; it's like an explicit version of ActsAsParanoid
- DestroyedAt , π - ActiveRecord mixin for safe destroys
- Immortal , π - make any ActiveRecord model paranoid by just including Immortal, and instead of being deleted from the database, the object will just marked as deleted with a boolean field in the database
- ActsAsArchive , π - don't delete your records, move them to a different table
- AASM , π - formerly acts_as_state_machine; state machines for Ruby and ActiveRecord
- γοΈ State Machines , π - state machines for ActiveRecord
- Geocoder , π - lookup latitude/longitude based on an address defined in your model or an IP address; search for nearby locations
- ActsAsTenant , π - easy multi-tenancy in a shared database setup
- Apartment , π - database multi-tenancy for ActiveRecord
- Bullet , π - help to kill N+1 queries and unused eager loading
- marginalia , π - attach comments to your ActiveRecord queries; helps when searching log files for queries, and seeing where slow queries came from
- SeedMigration , π - a way to manage changes to seed data similar way to how schema migrations are handled
- activerecord-import , π - activerecord-import is a library for bulk inserting data using ActiveRecord
- activerecord-importer , π - another simple data importer for activerecord in ruby
- ActiveRecord and PostgreSQL @ Rails Guides - PostgreSQL specific usage of Active Record (e.g. use PostgreSQL's datatypes - hstore, json, array etc.; use UUID primary keys; use full text search with PostgreSQL and more)
- Arel Gem π, - a SQL AST manager for Ruby; simplifies the generation of complex SQL queries and adapts to various SQL flavors
Documentation
- RDoc @ RubyDoc.info
- Article - How Arel Converts Ruby Queries Into SQL Statements - by Pat Shaughnessy
- dbbrowser , π - database browser (connections, schema, tables, records, etc.) as mountable web app
- ActiveAdmin - , π
- RailsAdmin , π
- Typus , π - admin panels and more
- Upmin Admin , π
- γοΈ Datapak , π - a library to work with tabular data packages (*.csv files w/ datapackage.json) in SQL via ActiveRecord
- data_miner , π - download, pull out of a ZIP/TAR/GZ/BZ2 archive, parse, correct, and import XLS, ODS, XML, CSV, HTML, etc. into your ActiveRecord models
- γοΈ Annotate / AnnotateModels , π - adds annotations (comments about the table schema) to your models
- γοΈ rails-erd , π - generate entity-relationship diagrams (ERD) for your activerecord models
- γοΈ schemadoc , π - auto-generate your database schema docs for tables, columns, etc.
- SchemaPlus , π - foreign key constraints, indexes, (auto-)validations and much more
- world.db Models , π - place, continent, country, state, muni, city, district, language, name, etc.
- sport.db Models , π - team, competition, season, league, match, round, group, squad, player, goal, etc.
- γοΈ beer.db Models , π - beer, brand, brewery, etc.
- activerecord-utils , π - utilities (e.g. random, alias_attr, etc.) for activerecord
- props-activerecord , π - manage setting hierachies addon for activerecord (ConfDb, Props Model, etc.)
- γοΈ logutils-activerecord , π - another logger addon for activerecord (LogDb, Log Model etc.)
SQLite
MySQL / MariaDB
- Awesome World @ Planet Open Data - countries, cities, languages, flags, latitude/longitude, etc.
More Object-relational (O/R) mapping libraries
- Sequel - , π - a simple, flexible, and powerful SQL database access toolkit for Ruby
- DataMapper - , π
License
The awesome list is dedicated to the public domain. Use it as you please with no restrictions whatsoever.
Questions? Comments?
Send them along to the ruby-talk mailing list. Thanks!