readonly author just for safety's sake
This commit is contained in:
parent
4718d03a87
commit
98b6052f1f
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue