diff --git a/lib/ext/entities.rb b/lib/ext/entities.rb index 9d430a1..40dcd98 100644 --- a/lib/ext/entities.rb +++ b/lib/ext/entities.rb @@ -1,24 +1,22 @@ -require File.join(Rails.root,'lib','noosfero','api','entities') -module Noosfero - module API - module Entities +require_dependency 'api/entities' - class Article < ArticleBase - expose :ranking_position - #FIXME see why children counter cache is not working - expose :amount_of_children do |article, options| - article.children.count - end - end +module Api + module Entities - class RankingItem < Entity - root :proposals, :proposal - expose :id, :position, :abstract, :body, :votes_for, :votes_against - expose :hits, :effective_support, :proposal_id, :created_at - expose :updated_at, :slug, :categories, :parent + class Article < ArticleBase + expose :ranking_position + #FIXME see why children counter cache is not working + expose :amount_of_children do |article, options| + article.children.count end + end + class RankingItem < Entity + root :proposals, :proposal + expose :id, :position, :abstract, :body, :votes_for, :votes_against + expose :hits, :effective_support, :proposal_id, :created_at + expose :updated_at, :slug, :categories, :parent end - end + end end -- libgit2 0.21.2