From 876d11aa585069679f2cd46b3a199c2fd58204b4 Mon Sep 17 00:00:00 2001 From: AntonioTerceiro Date: Sat, 24 Nov 2007 16:37:13 +0000 Subject: [PATCH] ActionItem21: reworking Article --- app/models/article.rb | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/app/models/article.rb b/app/models/article.rb index c5ca000..9b93df4 100644 --- a/app/models/article.rb +++ b/app/models/article.rb @@ -1,25 +1,14 @@ -class Article +class Article < ActiveRecord::Base acts_as_taggable - -# acts_as_ferret :fields => [:title, :body] - def keywords - tag_list.to_s - end - - def keywords=(list_tag) - self.tag_list = list_tag - end - def has_keyword?(keyword) - tags.map{|t| t.name.downcase}.include?(keyword.downcase) - end + acts_as_filesystem + + acts_as_versioned def profile(reload = false) @profile = nil if reload @profile ||= Profile.find_by_identifier(self.full_path.split(/\//).first) end - # FIXME add code from Category to make article acts as a "file system" - end -- libgit2 0.21.2