Hand-rolled implementation of the basic functionality of Ruby on Rails and Active Record, to improve my understanding of how these tools work under the hood.
- Singleton
Routerwith REGEX based route generation ApplicationController(asControllerBase)- Rendering of
erbtemplate views - Exposes
params,session,FlashandFlash.now - CSRF protection with
form authenticity tokenhelper - Basic
middleware(StaticAssets&ShowExceptions)
ActiveRecord::Basemodel superclass (asSQLObject)find,all,create,update,destroy- chainable
whereandwhere_lazy
ActiveRecord::Relation(asRelation)- Support for
belongs_to,has_manyandhas_one_throughassociations
- Conversion to a gem
- Additional ORM functionality:
- Chainable, lazy
joins - Eager loading with
includes - Polymorphic associations
- Chainable, lazy