diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index dda7f247d6815ebe04560e7227f91da283479c77..a0e810109fcb1f806ae4c403f52a7025879ea151 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -40,9 +40,10 @@ module ApplicationHelper def owner_picture default = "#{root_url}images/user/default.jpg" image = "#{root_url}images/user/#{User.first.profile.last_name.gsub(/ /,'').downcase}.jpg" - unless File.exist?(image) + + if File.exist?("public/images/user/#{User.first.profile.last_name.gsub(/ /,'').downcase}.jpg") image_tag image, :id => "user_picture" - else File.exist?(image) + else image_tag default, :id => "user_picture" end end