# \[ANN\] Classy Inheritance 0.5.0

**URL:** <https://www.ruby-forum.com/t/ann-classy-inheritance-0-5-0/142546>\
**Category:** Rails\
**Created:** [July 9, 2008, 2:16am UTC](https://www.ruby-forum.com/t/ann-classy-inheritance-0-5-0/142546 "2008-07-09T02:16:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![starmaerker](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e9bcb4/32.png) [@starmaerker](https://www.ruby-forum.com/u/starmaerker)\
**Post date:** [July 9, 2008, 2:16am UTC](https://www.ruby-forum.com/t/ann-classy-inheritance-0-5-0/142546/1 "2008-07-09T02:16:21Z")

</div>

_About:_

[http://stonean.com/wiki/classy-inheritance](http://stonean.com/wiki/classy-inheritance)

Classy Inheritance simplifies the definition and implementation of one  
object depending on another object. For example, a User object  
depending on  
a Person object. If you do the following:

class User \< ActiveRecord::Base

depends\_on :person, :attrs =\> [:first\_name, :last\_name, :email]

end

You will get @user.first\_name, @user.last\_name and @user.email  
functionality. So, direct usage of these attributes can be used on your  
form and the Person associated is created/maintained for you. e.g.:

\<% text\_field :user, :first\_name %\>

Classy Inheritance also supports polymorphic associations, more info on  
the  
wiki.

_In this release_:

Added two options for the depends\_on call: _validates\_presence\_if,  
validates\_associated\_if._

These options allow you to determine if/when the validation is called.  
Validation is on by default.

There is a wiki, forum and issue tracking for Classy Inheritance at  
[http://stonean.com](http://stonean.com)  
thanks,  
andy

–  
Andrew S.
