On Sep 14, 5:15 pm, djolley <[email protected]> wrote:
> > then topic.parent_id would
> > give you the id and topic.parent would give you the object.
>
> Why would topic.parent give me the object?  Is that an acts_as_tree
> thing?  I thought all acts_as_tree did was add the 3 methods,
> 'ancestors', 'root', and 'siblings'.  As far as I know, 'parent' is

acts as tree adds methods parent, children as well (or rather
associations but net effect is the same)

Fred

> not a reserved word in Ruby.  However, based on what you say, it would
> seem that the choice of 'parent' as the field name may be an
> *EXTREMELY* poor choice (even worse than I had thought).  Perhaps I
> would have been better off if it had been named 'dad' or 'mom' or
> something.  Anyway, I won't know the answer to that until I understand
> why topic.parent would return the object.  May I impose on you a bit
> further to tell me why that is.  Based on your answer, I may be FORCED
> to change the name of that field.
>
> Thanks a lot.
>
>           ... doug
--~--~---------~--~----~------------~-------~--~----~
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 [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-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to