diff --git a/app/models/members_block.rb b/app/models/members_block.rb index 483e6e7..c5ddb13 100644 --- a/app/models/members_block.rb +++ b/app/models/members_block.rb @@ -37,10 +37,6 @@ class MembersBlock < ProfileListBlock result end - def pick_random(top) - rand(top) - end - end diff --git a/app/models/profile_list_block.rb b/app/models/profile_list_block.rb index 834743f..13cc735 100644 --- a/app/models/profile_list_block.rb +++ b/app/models/profile_list_block.rb @@ -31,6 +31,9 @@ class ProfileListBlock < Block def find Profile.find(:all, :limit => block.limit, :order => 'created_at desc') end + def pick_random(top) + rand(top) + end end def profiles diff --git a/test/unit/profile_list_block_test.rb b/test/unit/profile_list_block_test.rb index b2580b1..6855280 100644 --- a/test/unit/profile_list_block_test.rb +++ b/test/unit/profile_list_block_test.rb @@ -25,7 +25,6 @@ class ProfileListBlockTest < Test::Unit::TestCase owner.boxes.first.blocks << block block.save! - # faking that we are picking random people profiles = [person1, person3] block.expects(:profiles).returns(profiles) -- libgit2 0.21.2