Nicolas:
first_name: Nicolas
type: Employee
reports_to: David
I'm being slow - you need to use the association name, not the
column
name (ie manager: David)
Fred
thanks works great now !!
a last question of you're still here : how to implement via
collections
has_and_belongs_to_many ?
This is in the docs: Peak Obsession
but in a nutshell:
- you don't need to specify the join table at all
- just comma separate the labels of the appropriate records eg if an
employee had and belongs to many projects you might have
Nicholas:
projects: death_star, relaunch, nemesis
to say that that user is a member of those projects.
This is in the docs: Peak Obsession
but in a nutshell:
- you don't need to specify the join table at all
- just comma separate the labels of the appropriate records eg if an
employee had and belongs to many projects you might have
Nicholas:
projects: death_star, relaunch, nemesis
to say that that user is a member of those projects.