Skip to content

thedig/ARLite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Active Record Lite

This project contains the basics of Active Record functionality. Metaprogramming is used in order to redefine common AR features:

  • attr_accessible and attr_accessor
  • Initial table setup
  • Common SQL queries, such as:
    • Find by id
    • Find all
    • Update record
    • Create new record
    • Save
  • BelongsTo and HasMany associations
  • HasOneThrough

SQL queries are written using Heredocs, leveraging string interpolation to handle a variable number of inputs into the queries. Methods and instance variables are setup through the use of ::send and ::define_method.

About

Active Record lite, rebuilt using metaprogramming.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages