Giter VIP home page Giter VIP logo

awesome-activerecord's Introduction

Awesome Series @ Planet Ruby

Rubies (Virtual Machines, Compilers, ...)ActiveRecordWebframeworks (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 - SortableActsAsTree - Hierarchy / NestedActsAsTaggable - Tags & Taggings, Categories & CategorizationsDate / 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

  • 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

  • SchemaPlus :octocat:, 💎 - foreign key constraints, indexes, (auto-)validations and much more

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!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.