Classy Inheritance<http://stonean.com/wiki/classy-inheritance/Classy-inheritance>provides two ActiveRecord methods: depends_on and can_be. Depends_on allows you define another model for which the calling model requires. A common setup for this is User -> Profile, where User.depends_on :profile, :attrs => [:first_name, :last_name, :email] This will add pass through methods so you can access the profile attributes define via the @user object: @user.first_name. This also means you can do @user.first_name = "Andrew". So, your view can be cleaned up by removing any calls/usage of the Profile class/object. Classy inheritance will validate and save the requisite object. You will also get a User.find_with_profile method that will automatically do the :include => :profile for you. It also supports polymorphic associations (was actually the reason it was created). Please check out the site documentation<http://stonean.com/wiki/classy-inheritance/Classy-inheritance>for more details. By the way, Classy Inheritance was written to use the methods exposed to developers such as belongs_to, validates_associated and so forth in order to avoid monkey patching the ActiveRecord code. thanks, andy -- Andrew Stone --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---