diff --git a/app/helpers/logs_helper.rb b/app/helpers/logs_helper.rb index 3b78607ee..c98dedad5 100644 --- a/app/helpers/logs_helper.rb +++ b/app/helpers/logs_helper.rb @@ -8,15 +8,6 @@ module LogsHelper end end - def log_type_for_action(action_name) - case action_name - when "lettings_logs" then "lettings" - when "sales_logs" then "sales" - else - raise "Log type not found for #{action_name}" - end - end - def bulk_upload_options(bulk_upload) array = bulk_upload ? [bulk_upload.id] : [] array.index_with { |_bulk_upload_id| "With logs from bulk upload" } diff --git a/app/views/organisations/logs.html.erb b/app/views/organisations/logs.html.erb index e516ce153..a30f696eb 100644 --- a/app/views/organisations/logs.html.erb +++ b/app/views/organisations/logs.html.erb @@ -1,5 +1,5 @@ <% item_label = format_label(@pagy.count, "logs") %> -<% title = format_title(@searched, "#{log_type_for_action(action_name).capitalize} logs", current_user, item_label, @pagy.count, @organisation.name) %> +<% title = format_title(@searched, action_name.humanize, current_user, item_label, @pagy.count, @organisation.name) %> <% content_for :title, title %>