aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe Sak <joe@joesak.com>2011-07-18 14:55:47 -0500
committerJoe Sak <joe@joesak.com>2011-07-18 14:55:47 -0500
commit98b6052f1f3ac9a99efd18f17d8d33d2da990589 (patch)
tree1f2b3f36a260ece6f0dd07ff49154dca3b1a8bbd
parent4718d03a873a4a184a1528c6dfb9178f437c4caf (diff)
downloadrefinerycms-blog-98b6052f1f3ac9a99efd18f17d8d33d2da990589.tar.gz
refinerycms-blog-98b6052f1f3ac9a99efd18f17d8d33d2da990589.tar.bz2
refinerycms-blog-98b6052f1f3ac9a99efd18f17d8d33d2da990589.zip
readonly author just for safety's sake
-rw-r--r--app/models/blog_post.rb2
1 files changed, 1 insertions, 1 deletions
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