diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/models/blog_post.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/blog_post.rb b/app/models/blog_post.rb index 679a21c..0dd1246 100644 --- a/app/models/blog_post.rb +++ b/app/models/blog_post.rb @@ -2,6 +2,8 @@ class BlogPost < ActiveRecord::Base default_scope :order => 'published_at DESC' + belongs_to :author, :foreign_key => 'user_id' + has_many :comments, :class_name => 'BlogComment', :dependent => :destroy has_many :categorizations |