From e81f6ba4401d50565bd958e5e805b151c4474d99 Mon Sep 17 00:00:00 2001 From: Rafael Reggiani Manzo Date: Thu, 10 Mar 2016 09:46:07 -0300 Subject: [PATCH] Refactor FansBlock footer into helper/view --- app/models/fans_block.rb | 8 -------- app/views/blocks/footers/fans.html.erb | 1 + 2 files changed, 1 insertion(+), 8 deletions(-) create mode 100644 app/views/blocks/footers/fans.html.erb diff --git a/app/models/fans_block.rb b/app/models/fans_block.rb index c11ef5a..36677c9 100644 --- a/app/models/fans_block.rb +++ b/app/models/fans_block.rb @@ -12,14 +12,6 @@ class FansBlock < ProfileListBlock _('This block presents the fans of an enterprise.') end - def footer - profile = self.owner - proc do - link_to _('View all'), :profile => profile.identifier, :controller => - 'profile', :action => 'fans' - end - end - def profiles owner.fans end diff --git a/app/views/blocks/footers/fans.html.erb b/app/views/blocks/footers/fans.html.erb new file mode 100644 index 0000000..6868c37 --- /dev/null +++ b/app/views/blocks/footers/fans.html.erb @@ -0,0 +1 @@ +<%= link_to _('View all'), :profile => block.owner.identifier, :controller => 'profile', :action => 'fans' %> -- libgit2 0.21.2