Commit 86c2f5eef9376f600fb58dab46c3124903c77eec
1 parent
30c9ba4d
Exists in
staging
and in
42 other branches
Fix EnterprisesBlock unit test
Showing
2 changed files
with
3 additions
and
3 deletions
Show diff stats
app/models/enterprises_block.rb
| @@ -16,11 +16,11 @@ class EnterprisesBlock < ProfileListBlock | @@ -16,11 +16,11 @@ class EnterprisesBlock < ProfileListBlock | ||
| 16 | owner = self.owner | 16 | owner = self.owner |
| 17 | case owner | 17 | case owner |
| 18 | when Profile | 18 | when Profile |
| 19 | - lambda do | 19 | + proc do |
| 20 | link_to s_('enterprises|View all'), :profile => owner.identifier, :controller => 'profile', :action => 'enterprises' | 20 | link_to s_('enterprises|View all'), :profile => owner.identifier, :controller => 'profile', :action => 'enterprises' |
| 21 | end | 21 | end |
| 22 | when Environment | 22 | when Environment |
| 23 | - lambda do | 23 | + proc do |
| 24 | link_to s_('enterprises|View all'), :controller => 'search', :action => 'assets', :asset => 'enterprises' | 24 | link_to s_('enterprises|View all'), :controller => 'search', :action => 'assets', :asset => 'enterprises' |
| 25 | end | 25 | end |
| 26 | else | 26 | else |
app/models/profile_list_block.rb
| @@ -28,7 +28,7 @@ class ProfileListBlock < Block | @@ -28,7 +28,7 @@ class ProfileListBlock < Block | ||
| 28 | end | 28 | end |
| 29 | 29 | ||
| 30 | def profile_count | 30 | def profile_count |
| 31 | - profiles.visible.count | 31 | + profiles.visible.length |
| 32 | end | 32 | end |
| 33 | 33 | ||
| 34 | # the title of the block. Probably will be overriden in subclasses. | 34 | # the title of the block. Probably will be overriden in subclasses. |