readonly author just for safety's sake

This commit is contained in:
Joe Sak 2011-07-18 14:55:47 -05:00
parent 4718d03a87
commit 98b6052f1f

View file

@ -8,7 +8,7 @@ class BlogPost < ActiveRecord::Base
default_scope :order => 'published_at DESC'
#.first & .last will be reversed -- consider a with_exclusive_scope on these?
belongs_to :author, :class_name => 'User', :foreign_key => :user_id
belongs_to :author, :class_name => 'User', :foreign_key => :user_id, :readonly => true
has_many :comments, :class_name => 'BlogComment', :dependent => :destroy
acts_as_taggable