From c2c152ee4b7276da064ed25155c0afb0625fae25 Mon Sep 17 00:00:00 2001 From: Sarah Mei Date: Sun, 16 Oct 2011 15:55:22 -0700 Subject: [PATCH] Change tag serializer to use tagged_people_count instead of people_count. Fixed typo (was tagge_people_count) --- app/models/api/v0/serializers/tag.rb | 2 +- app/views/tags/show.haml | 2 +- lib/stream/tag.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/api/v0/serializers/tag.rb b/app/models/api/v0/serializers/tag.rb index 73ef055d8..bd378607d 100644 --- a/app/models/api/v0/serializers/tag.rb +++ b/app/models/api/v0/serializers/tag.rb @@ -11,7 +11,7 @@ class Api::V0::Serializers::Tag def as_json(opts={}) { "name" => @stream.tag_name, - "person_count" => @stream.people_count, + "person_count" => @stream.tagged_people_count, "followed_count" => @stream.tag_follow_count, "posts" => [] } diff --git a/app/views/tags/show.haml b/app/views/tags/show.haml index 6e5017e6c..99f2dae38 100644 --- a/app/views/tags/show.haml +++ b/app/views/tags/show.haml @@ -36,7 +36,7 @@ .span-6.tags_people %h3 - = t('people', :count => @stream.tagge_people_count) + = t('people', :count => @stream.tagged_people_count) .side_stream.stream = render :partial => 'people/index', :locals => {:people => @stream.tagged_people} diff --git a/lib/stream/tag.rb b/lib/stream/tag.rb index a7ab4dd72..c02868af8 100644 --- a/lib/stream/tag.rb +++ b/lib/stream/tag.rb @@ -27,7 +27,7 @@ class Stream::Tag < Stream::Base @people ||= Person.profile_tagged_with(tag_name).paginate(:page => people_page, :per_page => 15) end - def tagge_people_count + def tagged_people_count @people_count ||= Person.profile_tagged_with(tag_name).count end