From 98b6052f1f3ac9a99efd18f17d8d33d2da990589 Mon Sep 17 00:00:00 2001 From: Joe Sak Date: Mon, 18 Jul 2011 14:55:47 -0500 Subject: readonly author just for safety's sake --- app/models/blog_post.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/blog_post.rb b/app/models/blog_post.rb index 738d25c..c9e93bf 100644 --- a/app/models/blog_post.rb +++ b/app/models/blog_post.rb @@ -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 -- cgit v1.2.3