diff --git a/src/noosfero-spb/software_communities/lib/ext/category.rb b/src/noosfero-spb/software_communities/lib/ext/category.rb index 0c3008c..092e6af 100644 --- a/src/noosfero-spb/software_communities/lib/ext/category.rb +++ b/src/noosfero-spb/software_communities/lib/ext/category.rb @@ -18,6 +18,8 @@ class Category _('Transportation and Transit') ] + has_many :softwares, :through => :profile_categorizations, :source => :profile, :class_name => 'Software' + scope :software_categories, lambda { software_category = Category.find_by_name("Software") if software_category.nil? @@ -26,10 +28,4 @@ class Category software_category.children end } - - def software_infos - software_list = self.communities - software_list.collect { |x| software_list.delete(x) unless x.software? } - software_list - end end diff --git a/src/noosfero-spb/software_communities/views/blocks/categories_software.html.erb b/src/noosfero-spb/software_communities/views/blocks/categories_software.html.erb index 6e914de..c378a39 100644 --- a/src/noosfero-spb/software_communities/views/blocks/categories_software.html.erb +++ b/src/noosfero-spb/software_communities/views/blocks/categories_software.html.erb @@ -9,8 +9,8 @@ -- libgit2 0.21.2