aboutsummaryrefslogtreecommitdiffstats
path: root/app/models
diff options
context:
space:
mode:
authorJoe Sak <joe@joesak.com>2011-03-11 12:58:58 -0600
committerJoe Sak <joe@joesak.com>2011-03-11 12:58:58 -0600
commitac7a6f6636912635835ff73320ded4ad1cc73746 (patch)
tree42166d90ee393bc448cd93d3d4bf9bd892dc6f51 /app/models
parentbd2802161ad8c7014a38ee5d0dbc52f515cd7011 (diff)
downloadrefinerycms-blog-ac7a6f6636912635835ff73320ded4ad1cc73746.tar.gz
refinerycms-blog-ac7a6f6636912635835ff73320ded4ad1cc73746.tar.bz2
refinerycms-blog-ac7a6f6636912635835ff73320ded4ad1cc73746.zip
Acts as taggable installed
Diffstat (limited to 'app/models')
-rw-r--r--app/models/blog_post.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/models/blog_post.rb b/app/models/blog_post.rb
index 1132c8f..db85a70 100644
--- a/app/models/blog_post.rb
+++ b/app/models/blog_post.rb
@@ -1,3 +1,5 @@
+require 'acts-as-taggable-on'
+
class BlogPost < ActiveRecord::Base
default_scope :order => 'published_at DESC'
@@ -6,6 +8,7 @@ class BlogPost < ActiveRecord::Base
belongs_to :author, :class_name => 'User', :foreign_key => :user_id
has_many :comments, :class_name => 'BlogComment', :dependent => :destroy
+ acts_as_taggable
has_many :categorizations
has_many :categories, :through => :categorizations, :source => :blog_category