Skip to content

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

Notifications You must be signed in to change notification settings

Liooo/awesome-activerecord

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

57 Commits
Β 
Β 

Repository files navigation

Awesome Series @ Planet Ruby

Rubies (Virtual Machines, Compilers, ...) β€’ ActiveRecord β€’ Webframeworks (Micro, Macro, APIs, ...) β€’ Events (Conferences, Camps, Meetups, ...) β€’ Blogs (News, Opinions, Podcasts, ...)

ActiveRecord

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.


Contributions welcome. Anything missing? Send in a pull request. Thanks.

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 HQ

  • 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

Rails Guides Series

ActsAsList - Sortable

ActsAsTree - Hierarchy / Nested

ActsAsTaggable - Tags & Taggings, Categories & Categorizations

Date / Time

  • 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

Attachments

Default Values

Validations

Pagination

  • 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

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
  • SoftDeletion :octocat:, πŸ’Ž - adds a new soft_delete method with callbacks and dependents support

ActsAsStateMachine - State Machines

Search

Query Builder

  • BabySqueel :octocat:, πŸ’Ž - an expressive query DSL for Active Record 4 and 5
  • 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
  • Goldiloader :octocat:, πŸ’Ž - automatically eager loads associations as they're traversed (helping to avoid N+1 queries)
  • 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

Thanks

Jacob Burenstam β€’ Ian Irving β€’ Scott P β€’ Joel Turkel

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