This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
| name | age | message | |
|---|---|---|---|
| |
MIT-LICENSE | ||
| |
README | ||
| |
Rakefile | ||
| |
VERSION | ||
| |
lib/ | ||
| |
spec/ | ||
| |
supermodel.gemspec |
README
SuperModel aims to give sexy semantics to any model/library in Ruby that you might create. This includes has, has_many and has_one semantics which we generally associate with ActiveRecord. This project draws its roots from the ActiveCouch project (http://www.github.com/arunthampi/activecouch), after which I saw myself re-using the same semantics in many other projects. Hence, the SuperModel project was born! The irony is that even though a SuperModel will be more bloated than a regular Ruby model, it will be better looking. So with SuperModel, you can define a model such as this: class Person < SuperModel::Base has :name, :which_is => :text, :with_default_value => "McLovin" end Also supports JSON serialization, so you can do this: p = Person.new(:name => 'McLovin').to_json # => {"name":"McLovin"} Plans For Future ---------------- 1. Serialization in any format: to_xml, to_yaml methods (and of course from_xml, from_yaml methods as well) 2. Callbacks: Define any callback for any event (This is stolen from ActiveRecord) 3. More Sexiness and Awesomeness








