Skip to content
Browse files

i wonder how many times those lines have been written (how many lines…

… must a man write down …)
  • Loading branch information...
1 parent a7d71b0 commit dff1be7083dd4ceae8d57e8b8a2ad37e25c6339e @hukl committed
Showing with 5 additions and 0 deletions.
  1. +3 −0 app/models/comment.rb
  2. +2 −0 app/models/post.rb
View
3 app/models/comment.rb
@@ -1,2 +1,5 @@
class Comment < ActiveRecord::Base
+
+ belongs_to :post
+
end
View
2 app/models/post.rb
@@ -1,5 +1,7 @@
class Post < ActiveRecord::Base
+ has_many :comments
+
default_scope :order => "published_at DESC"
def public_path

0 comments on commit dff1be7

Please sign in to comment.
Something went wrong with that request. Please try again.