Commit 11eaf495025a11223e3804839bf356f6c458e2b3
1 parent
9d0f27d3
Exists in
master
and in
29 other branches
stoa-plugin-tests: fixes person_api tests
attachment_fu doesn't provide #current_data for filesystem types of attachment anymore, so I added the method Image#current_data. Also fixes the column name that contains the tags' count for a sql query.
Showing
2 changed files
with
4 additions
and
1 deletions
Show diff stats
app/models/image.rb
plugins/stoa/lib/stoa_plugin/person_api.rb
... | ... | @@ -28,7 +28,7 @@ class StoaPlugin::PersonApi < Noosfero::FieldsDecorator |
28 | 28 | end |
29 | 29 | |
30 | 30 | def tags |
31 | - articles.published.tag_counts({:order => 'tags.count desc', :limit => 10}).inject({}) do |memo,tag| | |
31 | + articles.published.tag_counts({:order => 'count desc', :limit => 10}).inject({}) do |memo,tag| | |
32 | 32 | memo[tag.name] = tag.count |
33 | 33 | memo |
34 | 34 | end | ... | ... |