dawarich/app
Claude 429f90e666
Refactor: Apply Rails best practice for early returns
Follow Rails convention of using "render/redirect ... and return"
instead of standalone return statements in controller actions.

## Changes

**Shared::TripsController#show**
Before:
```ruby
unless @trip&.public_accessible?
  return redirect_to root_path, alert: '...'
end
```

After:
```ruby
redirect_to root_path, alert: '...' and return unless @trip&.public_accessible?
```

**TripsController#update**
Before:
```ruby
if params[:sharing]
  return update_sharing
end
```

After:
```ruby
update_sharing and return if params[:sharing]
```

## Benefits
- More idiomatic Rails code
- Clearer intent with single-line guard clauses
- Prevents potential double render issues
- Follows community best practices
2025-11-07 11:49:05 +00:00
..
assets Updte map view 2025-10-30 19:16:38 +01:00
channels Small fixes 2025-10-22 20:39:02 +02:00
controllers Refactor: Apply Rails best practice for early returns 2025-11-07 11:49:05 +00:00
helpers Implement public trip sharing with Shareable concern 2025-11-05 15:44:27 +00:00
javascript Implement public trip sharing with Shareable concern 2025-11-05 15:44:27 +00:00
jobs Fix UTM parameter assignment and update version to 0.34.2 2025-10-31 19:29:20 +01:00
mailers Fix some minor stuff 2025-10-11 14:17:48 +02:00
models Implement public trip sharing with Shareable concern 2025-11-05 15:44:27 +00:00
policies Implement public trip sharing with Shareable concern 2025-11-05 15:44:27 +00:00
queries Reimplement hexagons with H3 2025-09-17 01:55:42 +02:00
serializers Fix stats endpoint returning null for totalPointsTracked 2025-10-04 15:53:25 +02:00
services Show battery status on family member popup 2025-10-20 20:34:05 +02:00
views Refactor: Move trip sharing management to trips#update 2025-11-05 15:54:42 +00:00