Create a gist now

Instantly share code, notes, and snippets.

Simple model for has_one discussion.
class Employee
belongs_to: :department
end
class Departmet
belongs_to :organization
has_many :employees
end
class Organization
has_many :departments
has_many :employees through: :departments
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment