Commit fe08fd63b8f09c4ca586ae7ac0bc49a3bd188d98
Exists in
api_private_token
and in
2 other branches
Merge branch 'master' into api
Showing
4 changed files
with
6 additions
and
6 deletions
Show diff stats
plugins/people_block/lib/friends_block.rb
@@ -17,7 +17,7 @@ class FriendsBlock < PeopleBlockBase | @@ -17,7 +17,7 @@ class FriendsBlock < PeopleBlockBase | ||
17 | end | 17 | end |
18 | 18 | ||
19 | def suggestions | 19 | def suggestions |
20 | - owner.profile_suggestions.of_person.enabled.limit(3).includes(:suggestion) | 20 | + owner.suggested_profiles.of_person.enabled.limit(3).includes(:suggestion) |
21 | end | 21 | end |
22 | 22 | ||
23 | def footer | 23 | def footer |
plugins/people_block/test/functional/profile_controller_test.rb
@@ -17,8 +17,8 @@ class ProfileControllerTest < ActionController::TestCase | @@ -17,8 +17,8 @@ class ProfileControllerTest < ActionController::TestCase | ||
17 | login_as(user.login) | 17 | login_as(user.login) |
18 | owner = user.person | 18 | owner = user.person |
19 | 19 | ||
20 | - suggestion1 = owner.profile_suggestions.create(:suggestion => fast_create(Person)) | ||
21 | - suggestion2 = owner.profile_suggestions.create(:suggestion => fast_create(Person)) | 20 | + suggestion1 = ProfileSuggestion.create!(:suggestion => fast_create(Person), :person => owner) |
21 | + suggestion2 = ProfileSuggestion.create!(:suggestion => fast_create(Person), :person => owner) | ||
22 | 22 | ||
23 | FriendsBlock.delete_all | 23 | FriendsBlock.delete_all |
24 | block = FriendsBlock.new | 24 | block = FriendsBlock.new |
plugins/people_block/test/unit/friends_block_test.rb
@@ -138,8 +138,8 @@ class FriendsBlockTest < ActionView::TestCase | @@ -138,8 +138,8 @@ class FriendsBlockTest < ActionView::TestCase | ||
138 | 138 | ||
139 | should 'list owner\'s friends suggestions' do | 139 | should 'list owner\'s friends suggestions' do |
140 | owner = fast_create(Person) | 140 | owner = fast_create(Person) |
141 | - suggestion1 = owner.profile_suggestions.create(:suggestion => fast_create(Person)) | ||
142 | - suggestion2 = owner.profile_suggestions.create(:suggestion => fast_create(Person)) | 141 | + suggestion1 = ProfileSuggestion.create!(:suggestion => fast_create(Person), :person => owner) |
142 | + suggestion2 = ProfileSuggestion.create!(:suggestion => fast_create(Person), :person => owner) | ||
143 | 143 | ||
144 | block = FriendsBlock.new | 144 | block = FriendsBlock.new |
145 | block.stubs(:owner).returns(owner) | 145 | block.stubs(:owner).returns(owner) |
plugins/statistics/lib/statistics_block.rb
@@ -61,7 +61,7 @@ class StatisticsBlock < Block | @@ -61,7 +61,7 @@ class StatisticsBlock < Block | ||
61 | end | 61 | end |
62 | 62 | ||
63 | def templates | 63 | def templates |
64 | - Community.templates(environment) | 64 | + self.environment.community_templates |
65 | end | 65 | end |
66 | 66 | ||
67 | def is_template_counter_active? template_id | 67 | def is_template_counter_active? template_id |