hzamani / acts_as_relation

Multi table Inheritance for rails
http://hzamani.github.com/acts_as_relation/
MIT License
180 stars 58 forks source link

methods won't inherit #6

Closed ftheo closed 12 years ago

ftheo commented 12 years ago

I followed the example line by line however when I call pen.hello I don't get anything just nil. Any suggestions?

hzamani commented 12 years ago

You are right, it's not working any more (If it was someday I don't know how!) I made a quick fix on issue6 branch, but I think we have some tests missing! Pleas try it and let me know if there are problems with it.

ftheo commented 12 years ago

I don't know if this counts as an issue but if in the example the product has "has_many :sizes, :dependent => :destroy" then if you do pen.destroy the associated sizes will not be destroyed

ftheo commented 12 years ago

I made a quick fix for that however I haven't written any test for that. Now if you destroy the subclass the superclass will be destroyed as well

ftheo commented 12 years ago

I am also getting this error

/lib/active_record/acts/as_relation.rb:35: warning: already initialized constant AsMaster

hzamani commented 12 years ago

Can you show how to regenerate already initialized constant error?