From 295db76b7643868456eafb98cf760a5e383b41ed Mon Sep 17 00:00:00 2001 From: re4k Date: Thu, 28 Mar 2013 02:11:40 +0900 Subject: Refactor --- app/views/shared/_tweet.html.haml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'app/views/shared/_tweet.html.haml') diff --git a/app/views/shared/_tweet.html.haml b/app/views/shared/_tweet.html.haml index d98fdbb..3f76f1a 100644 --- a/app/views/shared/_tweet.html.haml +++ b/app/views/shared/_tweet.html.haml @@ -26,11 +26,10 @@ %span.type= type %dd %ul.inline - - actions.take(params[:controller] == "users" && params[:action] == "show" ? actions.count : 20).each do |a| | - - m = a.user || User.new + - actions.take(params[:action] == "show" ? actions.count : 20).each do |a| + - m = a.user %li - - if m.screen_name + - if m = link_to image_tag(m.profile_image_url, :alt => m.screen_name, :title => m.name), :controller => "users", :action => "best", :screen_name => m.screen_name - else - = image_tag(m.profile_image_url, :alt => m.name, :title => m.name) - + = image_tag asset_path("missing_profile_image.png"), :alt => "Missing User: #{a.user_id}", :title => "Missing User: #{a.user_id}" -- cgit v1.2.3