Related Models in Rails 3
- by Jack
Hi,
I am just starting my first Rails 3 project and am having some difficulties. I have two related models, projects and clients. I have set up the relationships as has_many and belongs_to. However in my projects views I can only access the client_id of the project. I would like to access the client's name and other parameters.
I am sure that previously in rails, I could just use project.client.name, but this is not working. Is there a new feature of Rails 3 that I have missed?
Cheers