Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Generate ActiveRecord Aggregations and convenience methods for composing them into your models.
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
generators/composition
lib/active_record/aggregation
MIT-LICENSE
README
init.rb

README

CompositionGenerator
====================

Generates a composition model and a convenience method for mixing it into your models.

Example
=======

./script/generate composition address street city state zip_code

class Person < ActiveRecord::Base
  has_address
end

p = Person.new

p.address = Address.new('1234 S. Main St.', 'Anytown', 'CA', 91234)


p.address.street
# => "1234 S. Main St."

p.street
# => "1234 S. Main St."

Copyright (c) 2008 Chris Eppstein, released under the MIT license
Something went wrong with that request. Please try again.