Skip to content

Instantly share code, notes, and snippets.

@jcohenho
Created January 28, 2014 21:03
Show Gist options
  • Save jcohenho/8676464 to your computer and use it in GitHub Desktop.
Save jcohenho/8676464 to your computer and use it in GitHub Desktop.
class Category < ActiveRecord::Base
has_one :blog
end
class Blog < ActiveRecord::Base
belongs_to :category
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment