github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

caring / composition_generator

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 4
    • 0
  • Source
  • Commits
  • Network (0)
  • Issues (0)
  • Downloads (0)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (1)
    • master ✓
  • Tags (0)
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

Generate ActiveRecord Aggregations and convenience methods for composing them into your models. — Read more

  cancel

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

added a require to the initializer so the composer doesn't get unloaded 
chriseppstein (author)
Sat Jun 07 12:31:15 -0700 2008
commit  45bd3356c4ebc88ca666fb7856d0ba4822fa01e8
tree    d90ceb3e8dd9203a3ecee76bc11a71389b66db95
parent  4f4fee3bb4f357d7e16e1d8d34c88c7b788d4b10
composition_generator /
name age
history
message
file MIT-LICENSE Loading commit data...
file README
directory generators/
file init.rb
directory lib/
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
Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server