From 8233aa6a3ebabe250113388364ee9ee12f1ea566 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Tue, 25 Aug 2015 13:03:30 +0200 Subject: [PATCH] adds different avatar for same initial name users --- Gemfile | 2 +- Gemfile.lock | 4 ++-- app/views/account/show.html.erb | 2 +- app/views/comments/_comment.html.erb | 2 +- app/views/debates/show.html.erb | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Gemfile b/Gemfile index f6b4f0e33..e2b104de0 100644 --- a/Gemfile +++ b/Gemfile @@ -32,7 +32,7 @@ gem 'simple_captcha2', require: 'simple_captcha' gem 'ckeditor' gem 'cancancan' gem 'social-share-button' -gem 'initialjs-rails' +gem 'initialjs-rails', '0.2.0' gem 'unicorn' gem 'paranoia' diff --git a/Gemfile.lock b/Gemfile.lock index ae1930e1d..67d007883 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -162,7 +162,7 @@ GEM i18n term-ansicolor (>= 1.3.2) terminal-table (>= 1.5.1) - initialjs-rails (0.1.0) + initialjs-rails (0.2.0) railties (>= 3.1, < 5.0) jquery-rails (4.0.4) rails-dom-testing (~> 1.0) @@ -357,7 +357,7 @@ DEPENDENCIES fuubar groupdate i18n-tasks - initialjs-rails + initialjs-rails (= 0.2.0) jquery-rails kaminari launchy diff --git a/app/views/account/show.html.erb b/app/views/account/show.html.erb index d24343ea5..fa9ccdd04 100644 --- a/app/views/account/show.html.erb +++ b/app/views/account/show.html.erb @@ -26,7 +26,7 @@

<%= t("account.show.avatar")%>

- <%= avatar_image(@account, size: 100) %> + <%= avatar_image(@account, seed: @account.id, size: 100) %>

<%= t("account.show.notifications")%>

diff --git a/app/views/comments/_comment.html.erb b/app/views/comments/_comment.html.erb index ca7474ebd..0a1fd19a3 100644 --- a/app/views/comments/_comment.html.erb +++ b/app/views/comments/_comment.html.erb @@ -14,7 +14,7 @@ <% if comment.user.organization? %> <%= image_tag("collective_avatar.png", size: 32, class: "avatar left") %> <% else %> - <%= avatar_image(comment.user, size: 32, class: "left") %> + <%= avatar_image(comment.user, seed: comment.user_id, size: 32, class: "left") %> <% end %> <% if comment.user.hidden? %> diff --git a/app/views/debates/show.html.erb b/app/views/debates/show.html.erb index 47ff9e34f..8dcc334b8 100644 --- a/app/views/debates/show.html.erb +++ b/app/views/debates/show.html.erb @@ -13,7 +13,7 @@

<%= @debate.title %>

- <%= avatar_image(@debate.author, size: 32, class: 'author-photo') %> + <%= avatar_image(@debate.author, seed: @debate.author_id, size: 32, class: 'author-photo') %> <% if @debate.author.hidden? %>