Awesome Series @ Planet Ruby
Rubies (Virtual Machines, Compilers, ...) β’ ActiveRecord β’ Webframeworks (Micro, Macro, APIs, ...) β’ Events (Conferences, Camps, Meetups, ...) β’ Blogs (News, Opinions, Podcasts, ...)
A collection of awesome ActiveRecord goodies, libraries, tools, extensions, guides, etc.
[ANNOUNCEMENT] Looking for awesome world data (countries, cities, flags, languages, currencies, etc.)? See the Awesome World List @ Planet Open Data.
Note: γοΈ stands for the Gem of the Week article in the Gem of the Week Series @ Planet Ruby.
ActsAsList - Sortable β’ ActsAsTree - Hierarchy / Nested β’ ActsAsTaggable - Tags & Taggings, Categories & Categorizations β’ Date / Time
- ActiveRecord (gem: activerecord, github: rails/rails/activerecord)
- 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 (gem: acts_as_list, github: swanandp/acts_as_list) - extension provides the capabilities for sorting and reordering a number of objects in a list
- ranked-model (gem: ranked-model, github: mixonic/ranked-model)
- ActsAsTree (gem: acts_as_tree, github: amerine/acts_as_tree) - extends ActiveRecord to add support for organizing items into parentβchildren relationships
- Ancestry (gem: ancestry, github: stefankroes/ancestry) - organise ActiveRecord model into a tree structure
- ActsAsTaggableOn (gem: acts-as-taggable-on, github: mbleigh/acts-as-taggable-on) - a tagging plugin for ActiveRecord that allows for custom tagging along dynamic contexts
- TagUtils (gem: tagutils, github: rubylibs/tagutils) - tag utilities (tag, taggings, tag list, etc.)
- Gutentag (gem: gutentag, github: pat/gutentag) - a good, simple, solid tagging extension for ActiveRecord
- ByStar (gem: by_star, github: radar/by_star) - easily and reliably query ActiveRecord objects based on time e.g. by_year, yesterday, before( Date.today )
- Season (gem: season, github joaodiogocosta/season) - automatically creates scopes for ActiveRecord date, datetime and timestamp attributes
- Groupdate (gem: groupdate, github: ankane/groupdate) - easily and reliably group ActiveRecord objects based on time e.g. day, week, hour of the day and more; has time zone support
- Paperclip (gem: paperclip, github: thoughtbot/paperclip) - easy file attachment management for ActiveRecord
- default_value_for (gem: default_value_for, github: FooBarWidget/default_value_for) - a way to specify default values for ActiveRecord models
- ActiveValidators (gem: activevalidators, github: franckverrot/activevalidators) - a collection of off-the-shelf ActiveRecord validations
- validates_email_format_of (gem: validates_email_format_of, github: validates-email-format-of/validates_email_format_of ) - validate e-mail addresses against RFC 2822 and RFC 3696
- Kaminari (gem: kaminari, github: amatsuda/kaminari) - a scope and engine based, clean, powerful, customizable and sophisticated paginator
- will_paginate (gem: will_paginate, github: mislav/will_paginate) - a pagination library
- order_query (gem: order_query, github: glebm/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
- SoftDeletion , π - adds a new soft_delete method with callbacks and dependents support
- AASM , π - formerly acts_as_state_machine; state machines for Ruby and ActiveRecord
- γοΈ State Machines , π - state machines for ActiveRecord
- BabySqueel , π - an expressive query DSL for Active Record 4 and 5
- Squeel , π - lets you write your Active Record queries with fewer strings, and more Ruby
- 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
- ActiveRecord Shards, π - sharded database and slaves
- Bullet , π - help to kill N+1 queries and unused eager loading
- Goldiloader , π - automatically eager loads associations as they're traversed (helping to avoid N+1 queries)
- 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
- bulk_insert , π - insert lots of rows in a single insert statement
- 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 , π
- Administrate , π
- Godmin , π
- γοΈ 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 - , π
Jacob Burenstam β’ Ian Irving β’ Scott P β’ Joel Turkel
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!