public
Description:
Homepage: http://svn.viney.net.nz/things/rails/plugins/active_record_defaults/
Clone URL: git://github.com/aussiegeek/active_record_defaults.git
name age message
file CHANGELOG Thu Sep 20 03:25:16 -0700 2007 git-svn-id: http://svn.viney.net.nz/things/rail... [jonathan]
file MIT-LICENSE Sat Oct 28 21:02:40 -0700 2006 git-svn-id: http://svn.viney.net.nz/things/rail... [jonathan]
file README Thu Sep 20 03:25:16 -0700 2007 git-svn-id: http://svn.viney.net.nz/things/rail... [jonathan]
file Rakefile Sat Oct 28 21:02:40 -0700 2006 git-svn-id: http://svn.viney.net.nz/things/rail... [jonathan]
file init.rb Sat Oct 28 21:02:40 -0700 2006 git-svn-id: http://svn.viney.net.nz/things/rail... [jonathan]
directory lib/ Thu Sep 20 03:25:16 -0700 2007 git-svn-id: http://svn.viney.net.nz/things/rail... [jonathan]
directory test/ Thu Sep 20 03:25:16 -0700 2007 git-svn-id: http://svn.viney.net.nz/things/rail... [jonathan]
README
= Active Record Defaults

If you find this plugin useful, please consider a donation to show your support!

  http://www.paypal.com/cgi-bin/webscr?cmd=_send-money
  
  Email address: jonathan.viney@gmail.com
  
== Instructions

Allow you to easily specify default values for attributes on new model objects. Eg:

  class Person < ActiveRecord::Base
    defaults :country => 'New Zealand', :type => 'Unknown', :address => proc { Address.new }
    
    default :last_name do |person|
      person.first_name
    end
  end
  
The default value is only used if the attribute is not present in the attributes hash.

See active_record_defaults.rb for full documentation.
  
== Installation

  script/plugin install http://svn.viney.net.nz/things/rails/plugins/active_record_defaults
  
== Help

Feel free to email with any problems, suggestions, bugs etc...

  jonathan dot viney @ gmail . com