Commit 3a9f5dcca7dc088836ba66a659b827683e7381c6

Authored by AntonioTerceiro
1 parent 5759d40d

ActionItem102: doc work


git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@666 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing 1 changed file with 3 additions and 0 deletions   Show diff stats
app/models/region.rb
... ... @@ -2,6 +2,9 @@
2 2 class Region < Category
3 3 has_and_belongs_to_many :validators, :class_name => Organization.name, :join_table => :region_validators
4 4  
  5 + # searches for organizations that could become validators for this region.
  6 + # <tt>search</tt> is passed as is to ferret's find_by_contents on Organizatio
  7 + # find_by_contents on Organization class.
5 8 def search_possible_validators(search)
6 9 Organization.find_by_contents(search).reject {|item| self.validator_ids.include?(item.id) }
7 10 end
... ...