Skip to content

Instantly share code, notes, and snippets.

@tadast
Created July 26, 2011 16:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tadast/1107162 to your computer and use it in GitHub Desktop.
Save tadast/1107162 to your computer and use it in GitHub Desktop.
class Office < ActiveRecord::Base
belongs_to :teacher
accepts_nested_attributes_for :teacher
end
class Teacher < ActiveRecord::Base
has_one :office
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment