-
-
Save mnordin/3bd6b70e1fbb8fb874a7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Comment < ActiveRecord::Base | |
attr_accessible :body | |
belongs_to :post, inverse_of: :comments | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Post < ActiveRecord::Base | |
attr_accessible :body, :title | |
has_many :comments, inverse_of: :post | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment