scopes tags only for Proposals
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user