Hi,

Looking for some help with the following...

I have two models:

---------------------------------------
class User

  has_many :tasks
...
end
---------------------------------------
class Task

  belongs_to :owner, :class_name => "User", :creator => true

....
end
----------------------------------------

This all works fine, but when I add 'children :tasks' to the User
class and try to view a user, the auto generated UI is throwing an
exception trying to find the tasks for a user by querying
tasks.user_id rather than tasks.owner_id.

Is there any way to make this work? I've had a look at the view_hints
and it seems that the children() method isn't aware of the association
name/class name distinction.

I'm suspecting that making this work for all cases might be difficult
as my schema will have more than one 'belongs_to :user' type
association for the Task model (one for :owner and one for :receiver).

Any thoughts?

Cheers,

Pete

-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" 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/hobousers?hl=en.

Reply via email to