Commit 876d11aa585069679f2cd46b3a199c2fd58204b4
1 parent
42e2e86a
Exists in
master
and in
29 other branches
ActionItem21: reworking Article
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@939 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
1 changed file
with
4 additions
and
15 deletions
Show diff stats
app/models/article.rb
1 | -class Article | |
1 | +class Article < ActiveRecord::Base | |
2 | 2 | |
3 | 3 | acts_as_taggable |
4 | - | |
5 | -# acts_as_ferret :fields => [:title, :body] | |
6 | - def keywords | |
7 | - tag_list.to_s | |
8 | - end | |
9 | - | |
10 | - def keywords=(list_tag) | |
11 | - self.tag_list = list_tag | |
12 | - end | |
13 | 4 | |
14 | - def has_keyword?(keyword) | |
15 | - tags.map{|t| t.name.downcase}.include?(keyword.downcase) | |
16 | - end | |
5 | + acts_as_filesystem | |
6 | + | |
7 | + acts_as_versioned | |
17 | 8 | |
18 | 9 | def profile(reload = false) |
19 | 10 | @profile = nil if reload |
20 | 11 | @profile ||= Profile.find_by_identifier(self.full_path.split(/\//).first) |
21 | 12 | end |
22 | 13 | |
23 | - # FIXME add code from Category to make article acts as a "file system" | |
24 | - | |
25 | 14 | end | ... | ... |