Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@mnordin
Created June 13, 2013 11:26
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 mnordin/07f8eb0ebb591335d9d8 to your computer and use it in GitHub Desktop.
Save mnordin/07f8eb0ebb591335d9d8 to your computer and use it in GitHub Desktop.
Inverse_of blog post, before
class Comment < ActiveRecord::Base
attr_accessible :body
belongs_to :post
end
class Post < ActiveRecord::Base
attr_accessible :body, :title
has_many :comments
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment