Commit cebdf7c4db6caf902d1374e0e55ffde9a30083fb

Authored by MoisesMachado
1 parent f840ef5c

ActionItem4: redirected the keywords of articles of comatose to the acts_as_taggable plugin


git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@428 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing 1 changed file with 13 additions and 2 deletions   Show diff stats
app/models/article.rb
1 1 class Article < Comatose::Page
2   -end
3   -class Article < Comatose::Page
  2 + acts_as_taggable
  3 +
  4 + def keywords
  5 + tag_list.to_s
  6 + end
  7 +
  8 + def keywords=(list_tag)
  9 + self.tag_list = list_tag
  10 + end
  11 +
  12 + def has_keyword?(keyword)
  13 + tags.map{|t| t.name.downcase}.include?(keyword.downcase)
  14 + end
4 15 end
... ...