diff options
author | Joe Sak <joe@joesak.com> | 2011-07-18 14:55:47 -0500 |
---|---|---|
committer | Joe Sak <joe@joesak.com> | 2011-07-18 14:55:47 -0500 |
commit | 98b6052f1f3ac9a99efd18f17d8d33d2da990589 (patch) | |
tree | 1f2b3f36a260ece6f0dd07ff49154dca3b1a8bbd /app/models | |
parent | 4718d03a873a4a184a1528c6dfb9178f437c4caf (diff) | |
download | refinerycms-blog-98b6052f1f3ac9a99efd18f17d8d33d2da990589.tar.gz refinerycms-blog-98b6052f1f3ac9a99efd18f17d8d33d2da990589.tar.bz2 refinerycms-blog-98b6052f1f3ac9a99efd18f17d8d33d2da990589.zip |
readonly author just for safety's sake
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/blog_post.rb | 2 |
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 |