From 9c7084a10bb3275f6a8260727e9825c2953d9e02 Mon Sep 17 00:00:00 2001 From: Eugene Burmakin Date: Sat, 26 Jul 2025 12:37:46 +0200 Subject: [PATCH 1/2] Fix request to a user in partial --- app/models/concerns/distance_convertible.rb | 5 ----- app/views/trips/_countries.html.erb | 2 +- app/views/trips/_distance.html.erb | 2 +- app/views/trips/_trip.html.erb | 2 +- 4 files changed, 3 insertions(+), 8 deletions(-) diff --git a/app/models/concerns/distance_convertible.rb b/app/models/concerns/distance_convertible.rb index 2a757303..30c7693b 100644 --- a/app/models/concerns/distance_convertible.rb +++ b/app/models/concerns/distance_convertible.rb @@ -37,11 +37,6 @@ module DistanceConvertible distance.to_f / conversion_factor end - def distance_for_user(user) - user_unit = user.safe_settings.distance_unit - distance_in_unit(user_unit) - end - module ClassMethods def convert_distance(distance_meters, unit) return 0.0 unless distance_meters.present? diff --git a/app/views/trips/_countries.html.erb b/app/views/trips/_countries.html.erb index 69a7fe08..0ae8f7e5 100644 --- a/app/views/trips/_countries.html.erb +++ b/app/views/trips/_countries.html.erb @@ -2,7 +2,7 @@
Distance
-
<%= trip.distance_for_user(current_user).round %> <%= distance_unit %>
+
<%= trip.distance_in_unit(distance_unit).round %> <%= distance_unit %>
diff --git a/app/views/trips/_distance.html.erb b/app/views/trips/_distance.html.erb index 6bb835e6..e4d2cc65 100644 --- a/app/views/trips/_distance.html.erb +++ b/app/views/trips/_distance.html.erb @@ -1,5 +1,5 @@ <% if trip.distance.present? %> - <%= trip.distance_for_user(current_user).round %> <%= distance_unit %> + <%= trip.distance_in_unit(distance_unit).round %> <%= distance_unit %> <% else %> Calculating... diff --git a/app/views/trips/_trip.html.erb b/app/views/trips/_trip.html.erb index c65373a1..d2fdd57d 100644 --- a/app/views/trips/_trip.html.erb +++ b/app/views/trips/_trip.html.erb @@ -5,7 +5,7 @@ <%= trip.name %>

- <%= "#{human_date(trip.started_at)} – #{human_date(trip.ended_at)}, #{trip.distance_for_user(current_user).round} #{current_user.safe_settings.distance_unit}" %> + <%= "#{human_date(trip.started_at)} – #{human_date(trip.ended_at)}, #{trip.distance_in_unit(current_user.safe_settings.distance_unit).round} #{distance_unit}" %>

Date: Sat, 26 Jul 2025 12:39:30 +0200 Subject: [PATCH 2/2] Update app version and changelog --- .app_version | 2 +- CHANGELOG.md | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.app_version b/.app_version index e8262eb5..db287d4a 100644 --- a/.app_version +++ b/.app_version @@ -1 +1 @@ -0.30.3 +0.30.4 diff --git a/CHANGELOG.md b/CHANGELOG.md index 2046bacf..daf30f53 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,16 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). + + +# [0.30.4] - 2025-07-25 + +## Fixed + +- The Warden error in jobs is now fixed. #1556 + + + # [0.30.3] - 2025-07-23 ## Changed