diff --git a/app/controllers/my/menus_controller.rb b/app/controllers/my/menus_controller.rb index a81705df3..2fac3d8d0 100644 --- a/app/controllers/my/menus_controller.rb +++ b/app/controllers/my/menus_controller.rb @@ -2,6 +2,6 @@ class My::MenusController < ApplicationController include FilterScoped def show - fresh_when @user_filtering + fresh_when etag: [ @user_filtering, Current.identity_token ] end end diff --git a/app/views/filters/menu/_places.html.erb b/app/views/filters/menu/_places.html.erb index c7afd625e..65b530f5c 100644 --- a/app/views/filters/menu/_places.html.erb +++ b/app/views/filters/menu/_places.html.erb @@ -3,9 +3,7 @@ <%= filter_place_menu_item user_path(Current.user), "My Profile", "person" %> <%= filter_place_menu_item notifications_path, "Notifications", "bell" %> <%= filter_place_menu_item notifications_settings_path, "Notification Settings", "settings" %> - <% cache [ Current.user, Current.identity_token ] do %> - <% Current.user.identity.memberships.where.not(user_tenant: Current.user.tenant).each do |membership| %> - <%= filter_place_menu_item root_url(script_name: "/#{membership.user_tenant}"), "#{membership.account_name}", "logo-color", new_window: true %> - <% end %> + <% Current.user.identity.memberships.where.not(user_tenant: Current.user.tenant).each do |membership| %> + <%= filter_place_menu_item root_url(script_name: "/#{membership.user_tenant}"), "#{membership.account_name}", "logo-color", new_window: true %> <% end %> <% end %> diff --git a/app/views/sessions/login_menu.html.erb b/app/views/sessions/login_menu.html.erb index 71d4db1a7..4f9b7c826 100644 --- a/app/views/sessions/login_menu.html.erb +++ b/app/views/sessions/login_menu.html.erb @@ -3,21 +3,18 @@
You don't have any existing Fizzy accounts.
- <% end %> + <% identity = Identity.find_signed(Current.identity_token.id) %> + <% memberships = identity&.memberships %> + <% if memberships.present? %> +You don't have any existing Fizzy accounts.
<% end %>