Commit fe08fd63b8f09c4ca586ae7ac0bc49a3bd188d98

Authored by Antonio Terceiro
2 parents eefb51d7 6fb823a9

Merge branch 'master' into api

plugins/people_block/lib/friends_block.rb
... ... @@ -17,7 +17,7 @@ class FriendsBlock < PeopleBlockBase
17 17 end
18 18  
19 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 21 end
22 22  
23 23 def footer
... ...
plugins/people_block/test/functional/profile_controller_test.rb
... ... @@ -17,8 +17,8 @@ class ProfileControllerTest < ActionController::TestCase
17 17 login_as(user.login)
18 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 23 FriendsBlock.delete_all
24 24 block = FriendsBlock.new
... ...
plugins/people_block/test/unit/friends_block_test.rb
... ... @@ -138,8 +138,8 @@ class FriendsBlockTest < ActionView::TestCase
138 138  
139 139 should 'list owner\'s friends suggestions' do
140 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 144 block = FriendsBlock.new
145 145 block.stubs(:owner).returns(owner)
... ...
plugins/statistics/lib/statistics_block.rb
... ... @@ -61,7 +61,7 @@ class StatisticsBlock < Block
61 61 end
62 62  
63 63 def templates
64   - Community.templates(environment)
  64 + self.environment.community_templates
65 65 end
66 66  
67 67 def is_template_counter_active? template_id
... ...