From 07dbbeb404dedcf9733262ae2ce9cdddc086bb0e Mon Sep 17 00:00:00 2001 From: nfoy Date: Sun, 27 Apr 2014 19:12:01 -0400 Subject: Tournament index now displays game images. Images must be named the exact name of the game and be of the .png format. --- app/views/common/_show_tournament.html.erb | 4 +++- app/views/users/show.html.erb | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'app/views') diff --git a/app/views/common/_show_tournament.html.erb b/app/views/common/_show_tournament.html.erb index a9569b6..280d59d 100644 --- a/app/views/common/_show_tournament.html.erb +++ b/app/views/common/_show_tournament.html.erb @@ -1,5 +1,6 @@
-
<%= image_tag('http://www.gravatar.com/avatar/' + Digest::MD5.hexdigest(target.hosts.first.email) + '?s=100&d=mm', class: "t-image") %> +
+ <%= image_tag(target.game.name.downcase.tr(" ", "_") + ".png", class: "t-image") %>

<%= Game.find(target.game_id).name %>

@@ -8,6 +9,7 @@
Hosted by: <%= target.hosts.first.name %> + <%= image_tag('http://www.gravatar.com/avatar/' + Digest::MD5.hexdigest(target.hosts.first.email) + '?s=45&d=identicon', class: "t-image") %>

Players per team: <%= target.min_players_per_team %>

diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index a67aed9..b408589 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -2,7 +2,7 @@

<%= @user.user_name %>'s Profile

- <%= image_tag 'http://www.gravatar.com/avatar/' + Digest::MD5.hexdigest(@user.email) + '?s=100&d=mm' %> + <%= image_tag 'http://www.gravatar.com/avatar/' + Digest::MD5.hexdigest(@user.email) + '?s=100&d=identicon' %>

-- cgit v1.2.3-54-g00ecf