I'm not sure if this is a DataMapper issue or a Merb issue.  I have
two models - Project and Company.  Project has a belongs_to :company
association.  Company has a "has n :projects" association.

On the show view for a project, I want the associated company along
with a link to that company's show action.

Calling resource() with the associated object directly results in a
Generation Error.  However, if I load the company recored fresh from
the database, it works.

Doesn't Work:
<%= link_to @project.company.name, resource(@project.company) %>

Works:
<%= link_to @project.company.name, resource(Company.get
(@project.company.id)) %>

Do I need to do something different with my associations?  Is this a
bug or am I just missing something?

Thanks,
Glen

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

Reply via email to