diff --git a/lib/ext/entities.rb b/lib/ext/entities.rb index eeb9645..d29b104 100644 --- a/lib/ext/entities.rb +++ b/lib/ext/entities.rb @@ -3,26 +3,16 @@ module Noosfero module API module Entities - #FIXME make test - class ArticleBase < Entity + class Article < ArticleBase +#FIXME Leandro changed the method to model +# expose :ranking_position do |article, options| +# article.kind_of?(ProposalsDiscussionPlugin::Proposal) && article.ranking_item.present? ? article.ranking_item.position : nil +# end expose :ranking_position #FIXME see why children counter cache is not working expose :amount_of_children do |article, options| article.children.count end - - end - - def self.included(base) - base.extend(ClassMethods) - end - - module ClassMethods - class ArticleBase < Entity - expose :ranking_position do |article, options| - article.kind_of?(ProposalsDiscussionPlugin::Proposal) && article.ranking_item.present? ? article.ranking_item.position : nil - end - end end end -- libgit2 0.21.2