Closed dschmura closed 13 years ago
acts_as add a has_one :parent
to child models. usually for has_one
association parent class needs a child_id, but here we use this for multiple models and so I decided to use parent_id
because all children act as parent!
Thanks. As I am reading and learning more about polywhozits, the answer became clear. Sorry for the trouble. I would love to see more documentation on using acts_as_relation within a rails site (doing the crud views for example). I am still very much on training wheels, and I understand that it is not your job to provide a learning scaffold for me, but it would be helpful. If not, when I get my legs under me I will write something up.
Thanks again,
Dave
Hi Hassan,
I am wondering why the parent class needs to have an explicit parent_class_id object? Isn't this something that could be automatically derived from the id?
I am fairly new to ROR (and trying to bite off a big bite on the first go), so I apologize if the answer is self-evident.
Thanks,
Dave