Commit c6674dd32c1abde0ee3d70fa43498e9156a7ab89
1 parent
e81f6ba4
Exists in
staging
and in
32 other branches
Refactor FavoriteEnterprisesBlock footer
It was extracted into a helper and view which are the correct handlers for such logic.
Showing
2 changed files
with
3 additions
and
8 deletions
Show diff stats
app/models/favorite_enterprises_block.rb
@@ -12,14 +12,6 @@ class FavoriteEnterprisesBlock < ProfileListBlock | @@ -12,14 +12,6 @@ class FavoriteEnterprisesBlock < ProfileListBlock | ||
12 | _('Favorite Enterprises') | 12 | _('Favorite Enterprises') |
13 | end | 13 | end |
14 | 14 | ||
15 | - def footer | ||
16 | - owner = self.owner | ||
17 | - return '' unless owner.kind_of?(Person) | ||
18 | - proc do | ||
19 | - link_to _('enterprises|View all'), {:profile => owner.identifier, :controller => 'profile', :action => 'favorite_enterprises'}, :class => 'view-all' | ||
20 | - end | ||
21 | - end | ||
22 | - | ||
23 | def profiles | 15 | def profiles |
24 | owner.favorite_enterprises | 16 | owner.favorite_enterprises |
25 | end | 17 | end |