def has_default_association *names, &default_proc
      opts = names.extract_options!
      opts.assert_valid_keys(:eager)
      
      names.each do |name|
        create_default_association(name, default_proc)
        add_default_association_callback(name) if opts[:eager]
      end
    end
def has_default_association *names, &default_proc
      opts = names.extract_options!
      opts.assert_valid_keys(:eager)
      
      names.each do |name|
        create_default_association(name, default_proc)
        add_default_association_callback(name) if opts[:eager]
      end
    end
Declare default associations for ActiveRecord models.

   # Build a new association on demand
   belongs_to :address
   has_default_association :address

   # Build a custom assocation on demand
   belongs_to :address
   has_default_association :address do |model|
     Address.new(:name => model.full_name)
   end

 =Options

 +eager+ will instantiate a default assocation when a
 model is initialized.