Skip to content

A collection of awesome ActiveRecord goodies, libraries, tools, extensions, guides, etc.

Notifications You must be signed in to change notification settings

jturkel/awesome-activerecord

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

43 Commits
Β 
Β 

Repository files navigation

awesome-activerecord

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 :octocat: 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

  • ActiveRecord Gem πŸ’Ž, :octocat:
    • 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

Rails Guides Series

ActsAsList - Sortable

ActsAsTree - Hierarchy / Nested

  • ActsAsTree :octocat:, πŸ’Ž - extends ActiveRecord to add support for organizing items into parent–children relationships
  • Ancestry :octocat:, πŸ’Ž - organise ActiveRecord model into a tree structure

Tags & Taggings, Categories & Categorizations

Date / Time

  • ByStar :octocat:, πŸ’Ž - easily and reliably query ActiveRecord objects based on time e.g. by_year, yesterday, before( Date.today )
  • Season :octocat:, πŸ’Ž - automatically creates scopes for ActiveRecord date, datetime and timestamp attributes
  • Groupdate :octocat:, πŸ’Ž - easily and reliably group ActiveRecord objects based on time e.g. day, week, hour of the day and more; has time zone support

Attachments

Default Values

Validations

Pagination

  • Kaminari :octocat:, πŸ’Ž - a scope and engine based, clean, powerful, customizable and sophisticated paginator
  • will_paginate :octocat:, πŸ’Ž - a pagination library
  • order_query :octocat:, πŸ’Ž - 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

ActsAsVersioned - Versioning / Auditing

ActsAsParanoid - Soft Delete / Keep Deleted Records

  • Paranoia :octocat:, πŸ’Ž - a re-implementation of acts_as_paranoid
  • ActsAsParanoid :octocat:, πŸ’Ž - soft delete; hide records instead of deleting them, making them recoverable later
  • PermanentRecords :octocat:, πŸ’Ž - soft-delete your ActiveRecord records; it's like an explicit version of ActsAsParanoid
  • DestroyedAt :octocat:, πŸ’Ž - ActiveRecord mixin for safe destroys
  • Immortal :octocat:, πŸ’Ž - 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 :octocat:, πŸ’Ž - don't delete your records, move them to a different table

ActsAsStateMachine - State Machines

Search

Query Builder

  • Squeel :octocat:, πŸ’Ž - lets you write your Active Record queries with fewer strings, and more Ruby

Geocoding

  • Geocoder :octocat:, πŸ’Ž - lookup latitude/longitude based on an address defined in your model or an IP address; search for nearby locations

Multi Tenancy

Performance / Profiling / Debugging

  • Bullet :octocat:, πŸ’Ž - help to kill N+1 queries and unused eager loading
  • marginalia :octocat:, πŸ’Ž - attach comments to your ActiveRecord queries; helps when searching log files for queries, and seeing where slow queries came from

Seeds / Data Migrations

  • SeedMigration :octocat:, πŸ’Ž - a way to manage changes to seed data similar way to how schema migrations are handled

Bulk / Batch Importer

ActiveRecord and PostgreSQL

  • 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 / A Relational Algebra / Arel Really Exasperates Logicians

  • Arel Gem πŸ’Ž, :octocat: - a SQL AST manager for Ruby; simplifies the generation of complex SQL queries and adapts to various SQL flavors

Documentation

Database Browser

  • dbbrowser :octocat:, πŸ’Ž - database browser (connections, schema, tables, records, etc.) as mountable web app

Database Admin / Scaffold

Text-to-SQL

  • γŠ—οΈ Datapak :octocat:, πŸ’Ž - a library to work with tabular data packages (*.csv files w/ datapackage.json) in SQL via ActiveRecord
  • data_miner :octocat:, πŸ’Ž - download, pull out of a ZIP/TAR/GZ/BZ2 archive, parse, correct, and import XLS, ODS, XML, CSV, HTML, etc. into your ActiveRecord models

Schema Documentation / Annotations / Diagrams

Schema Extensions

Ready-to-Use (Instant) Models / Schemas

Misc

Databases

SQLite

MySQL / MariaDB

Datasets / Plain Text Fixtures

Alternatives

More Object-relational (O/R) mapping libraries

Meta

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!

About

A collection of awesome ActiveRecord goodies, libraries, tools, extensions, guides, etc.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published