class User << ActiveRecord::Base belongs_to :customer end class Customer << ActiveRecord::Base has_one :user delegate :name, :name=, :email, :email=, :to => :user end
Now you can refer to @customer.name and @customer.email to retrieve and set values for those attributes directly. Pretty nice, huh?
Yeah, nice stuff from wyeworks and Rails.
effective date: 2009-06-04 16:50:33 UTC