From 7828c152866ff7f7341c7208593c7671243ba5a7 Mon Sep 17 00:00:00 2001 From: farhatahmad <35435341+farhatahmad@users.noreply.github.com> Date: Mon, 8 Jul 2019 09:02:34 -0400 Subject: [PATCH 01/17] GRN2-166: Fixed issue with language fallback not working (Fixed #593) (#602) * Fixed issue with language fallback not working * Rubocop fixes --- app/views/rooms/show.html.erb | 3 ++- app/views/shared/components/_room_block.html.erb | 6 +++++- config/application.rb | 4 ---- config/environments/production.rb | 4 ---- config/initializers/languages.rb | 7 +++++++ 5 files changed, 14 insertions(+), 10 deletions(-) diff --git a/app/views/rooms/show.html.erb b/app/views/rooms/show.html.erb index e9b76d47..83aa968d 100644 --- a/app/views/rooms/show.html.erb +++ b/app/views/rooms/show.html.erb @@ -18,10 +18,11 @@
-

<%= @room.name %>

<% if current_user.main_room == @room %> +

<%= t("home_room") %>

<% else %> +

<%= @room.name %>

<% end %>
diff --git a/app/views/shared/components/_room_block.html.erb b/app/views/shared/components/_room_block.html.erb index 167f3fb0..9e8c6fc4 100644 --- a/app/views/shared/components/_room_block.html.erb +++ b/app/views/shared/components/_room_block.html.erb @@ -28,7 +28,11 @@
-

<%= room.name %>

+ <% if room == current_user.main_room %> +

<%= t("home_room") %>

+ <% else %> +

<%= room.name %>

+ <% end %>