From 002a8bdbb264d68e6c8c2b3268597a756c7cf107 Mon Sep 17 00:00:00 2001 From: Jack S Date: Wed, 26 Jul 2023 16:22:33 +0100 Subject: [PATCH] Use current_user helper method --- app/views/logs/_log_filters.html.erb | 10 +++++----- app/views/schemes/_scheme_filters.html.erb | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/views/logs/_log_filters.html.erb b/app/views/logs/_log_filters.html.erb index cc3e3b4fb..1034379db 100644 --- a/app/views/logs/_log_filters.html.erb +++ b/app/views/logs/_log_filters.html.erb @@ -55,7 +55,7 @@ type: "select", label: "User", category: "user", - options: assigned_to_filter_options(@current_user), + options: assigned_to_filter_options(current_user), }, }, }, @@ -63,7 +63,7 @@ category: "assigned_to", } %> - <% if @current_user.support? || @current_user.organisation.stock_owners.count > 1 && request.path == "/lettings-logs" %> + <% if current_user.support? || current_user.organisation.stock_owners.count > 1 && request.path == "/lettings-logs" %> <%= render partial: "filters/radio_filter", locals: { f:, options: { @@ -74,7 +74,7 @@ type: "select", label: "Owning Organisation", category: "owning_organisation", - options: owning_organisation_filter_options(@current_user), + options: owning_organisation_filter_options(current_user), }, }, }, @@ -83,7 +83,7 @@ } %> <% end %> - <% if (@current_user.support? || @current_user.organisation.managing_agents.count > 1) && request.path == "/lettings-logs" %> + <% if (current_user.support? || current_user.organisation.managing_agents.count > 1) && request.path == "/lettings-logs" %> <%= render partial: "filters/radio_filter", locals: { f:, options: { @@ -94,7 +94,7 @@ type: "select", label: "Managed by", category: "managing_organisation", - options: managing_organisation_filter_options(@current_user), + options: managing_organisation_filter_options(current_user), }, }, }, diff --git a/app/views/schemes/_scheme_filters.html.erb b/app/views/schemes/_scheme_filters.html.erb index 0c70a8940..23da513f8 100644 --- a/app/views/schemes/_scheme_filters.html.erb +++ b/app/views/schemes/_scheme_filters.html.erb @@ -23,7 +23,7 @@ category: "status", } %> - <% if @current_user.support? || @current_user.organisation.stock_owners.count > 1 %> + <% if current_user.support? || current_user.organisation.stock_owners.count > 1 %> <%= render partial: "filters/radio_filter", locals: { f:, options: { @@ -34,7 +34,7 @@ type: "select", label: "Owning Organisation", category: "owning_organisation", - options: owning_organisation_filter_options(@current_user), + options: owning_organisation_filter_options(current_user), }, }, },