I have two entities (Department and Project) that extends
ActiveRecord::Base. The department is mapped to have many projects. When
i make a query using the find(:all) (Department.find(:all)), i get a
collection of the departments with the attributes(id, project_id) of the
database. I would like to receive in each department one entity of the
project class.
I will appreciate any help
class Department < ActiveRecord::Base
has_many :project
end