Thanks for the great excuse to figure out GitHub workflow :-)
http://github.com/JackDanger/rails/commits/becomes_recognizes_inheritance_column
::Jack
On Sat, Apr 12, 2008 at 9:24 AM, Carlos Júnior <carlos@milk-it.net> wrote:
>
> *Wouldn''t be nice if this could save the new type of the record,
if it
> has a "type" column (single table inheritance)?
>
> *>> a = Account.find 2
> => #<Account id: 2 ...>
> >> a.becomes(ManagerAccount)
> => #<ManagerAccount id: 2 ...>
> >> a.save
> => true
> >> a = Account.find 2
> => #<Account id: 2 ...>**
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Core" group.
To post to this group, send email to rubyonrails-core@googlegroups.com
To unsubscribe from this group, send email to
rubyonrails-core-unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---