Commit 42299045fd2918bd9fae92b2db1bfff649034456

Authored by Victor Costa
1 parent 20b8060d

Add parent to ranking api

lib/ext/entities.rb
@@ -15,7 +15,7 @@ module Noosfero @@ -15,7 +15,7 @@ module Noosfero
15 root :proposals, :proposal 15 root :proposals, :proposal
16 expose :id, :position, :abstract, :body, :votes_for, :votes_against 16 expose :id, :position, :abstract, :body, :votes_for, :votes_against
17 expose :hits, :effective_support, :proposal_id, :created_at 17 expose :hits, :effective_support, :proposal_id, :created_at
18 - expose :updated_at, :slug, :categories 18 + expose :updated_at, :slug, :categories, :parent
19 end 19 end
20 20
21 end 21 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, :categories, :to => :proposal 7 + delegate :body, :slug, :categories, :parent, :to => :proposal
8 8
9 end 9 end