From 86c2f5eef9376f600fb58dab46c3124903c77eec Mon Sep 17 00:00:00 2001 From: Leandro Nunes dos Santos Date: Fri, 26 Jul 2013 19:43:31 -0300 Subject: [PATCH] Fix EnterprisesBlock unit test --- app/models/enterprises_block.rb | 4 ++-- app/models/profile_list_block.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/enterprises_block.rb b/app/models/enterprises_block.rb index 31ccb41..253acae 100644 --- a/app/models/enterprises_block.rb +++ b/app/models/enterprises_block.rb @@ -16,11 +16,11 @@ class EnterprisesBlock < ProfileListBlock owner = self.owner case owner when Profile - lambda do + proc do link_to s_('enterprises|View all'), :profile => owner.identifier, :controller => 'profile', :action => 'enterprises' end when Environment - lambda do + proc do link_to s_('enterprises|View all'), :controller => 'search', :action => 'assets', :asset => 'enterprises' end else diff --git a/app/models/profile_list_block.rb b/app/models/profile_list_block.rb index 69f0dfb..f4562fb 100644 --- a/app/models/profile_list_block.rb +++ b/app/models/profile_list_block.rb @@ -28,7 +28,7 @@ class ProfileListBlock < Block end def profile_count - profiles.visible.count + profiles.visible.length end # the title of the block. Probably will be overriden in subclasses. -- libgit2 0.21.2