scopes tags only for Proposals

This commit is contained in:
rgarcia
2016-01-27 15:11:59 +01:00
parent 48b5aba1c5
commit 5bea145d71
2 changed files with 4 additions and 1 deletions

View File

@@ -24,7 +24,7 @@ class TagCloud
end
def resource_model_scoped
scope ? resource_model.search(scope) : resource_model
scope && resource_model == Proposal ? resource_model.search(scope) : resource_model
end
def default_blacklist

View File

@@ -79,6 +79,9 @@ describe TagCloud do
expect(tag_names(tag_cloud)).to contain_exactly('parks')
end
xit "returns tags scoped by category for debates"
xit "returns tags scoped by geozone for debates"
it "orders tags by count" do
3.times { create(:proposal, tag_list: 'participation') }
create(:proposal, tag_list: 'corruption')