On Jan 22, 2008, at 4:18 PM, Michael Koziarski wrote:

>
> AR only support single table inheritance, so what you're trying to do
> won't work.  set_table_name should probably raise an exception to
> prevent you getting surprised like that though.
>


seriously?  the docs say:

"If you don‘t have a type column defined in your table, single-table  
inheritance won‘t be triggered. In that case, it‘ll work just like  
normal subclasses with no special magic for differentiating between  
them or reloading the right type with find."

and, of course, i have no type field... and, in the source

ar/base.rb

1060       # True if this isn't a concrete subclass needing a STI  
type condition.
1061       def descends_from_active_record?
1062         if superclass.abstract_class?
1063           superclass.descends_from_active_record?
1064         else
1065           superclass == Base || !columns_hash.include? 
(inheritance_column)
1066         end
1067       end

which i was reading to be inline with the docs.  also the code i  
posted has worked with previous versions of rails just fine...

of course you would know!  ;-)

did i just get lucky before?

kind regards.

a @ http://codeforpeople.com/
--
it is not enough to be compassionate.  you must act.
h.h. the 14th dalai lama




--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to