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
Router
with REGEX based route generation ApplicationController
(asControllerBase
)- Rendering of
erb
template views - Exposes
params
,session
,Flash
andFlash.now
- CSRF protection with
form authenticity token
helper - Basic
middleware
(StaticAssets
&ShowExceptions
)
ActiveRecord::Base
model superclass (asSQLObject
)find
,all
,create
,update
,destroy
- chainable
where
andwhere_lazy
ActiveRecord::Relation
(asRelation
)- Support for
belongs_to
,has_many
andhas_one_through
associations
- Conversion to a gem
- Additional ORM functionality:
- Chainable, lazy
join
s - Eager loading with
includes
- Polymorphic associations
- Chainable, lazy