Commit 0f80ce0dc14bd9259dc01e1c6eced8d6034a4e04

Authored by Victor Costa
1 parent b6e19656

Add categories to ranking endpoint

lib/ext/entities.rb
@@ -19,7 +19,7 @@ module Noosfero @@ -19,7 +19,7 @@ module Noosfero
19 root :proposals, :proposal 19 root :proposals, :proposal
20 expose :id, :position, :abstract, :body, :votes_for, :votes_against 20 expose :id, :position, :abstract, :body, :votes_for, :votes_against
21 expose :hits, :effective_support, :proposal_id, :created_at 21 expose :hits, :effective_support, :proposal_id, :created_at
22 - expose :updated_at, :slug 22 + expose :updated_at, :slug, :categories
23 end 23 end
24 24
25 end 25 end
lib/proposals_discussion_plugin/ranking_item.rb
@@ -4,6 +4,6 @@ class ProposalsDiscussionPlugin::RankingItem < ActiveRecord::Base @@ -4,6 +4,6 @@ class ProposalsDiscussionPlugin::RankingItem < ActiveRecord::Base
4 4
5 attr_accessible :proposal, :abstract, :votes_for, :votes_against, :hits, :effective_support 5 attr_accessible :proposal, :abstract, :votes_for, :votes_against, :hits, :effective_support
6 6
7 - delegate :body, :slug, :to => :proposal 7 + delegate :body, :slug, :categories, :to => :proposal
8 8
9 end 9 end