Skip to content

medellinrb/activerecord-internals

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

activerecord-internals (aka EmpanadaRecord)

ActiveRecord Internals talk. Code and Resources

Talk slides here

EmpanadaRecord

Our just-for-fun implementation of Active Record pattern

Our rails inspired API:

class Product < EmpanadaRecord::Base
  attr_accessor :id, :name

  #...
end

Product.all             # retrieves all products in DB
Product.find(99)        # retrieve a product with ID=99

Today Kata

Fork and grow EmpanadaRecord. Pull Requests are welcome

Some ideas:

  • Implement all, count, first, last, where, etc
  • Implement find_by_attribute (dynamic attributes)
  • Add support for multiple DB adapters (see Adapter pattern)
  • Improve DB setup/teardown in tests

About

ActiveRecord Internals talk. Code and Resources

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages