dawarich/app/controllers
Claude 9fba3ce4ca
Refactor: Move trip sharing management to trips#update
Simplifies architecture by using the existing trips#update route for
sharing settings management instead of a separate route.

## Changes

**Routes**
- Removed: PATCH /trips/:id/sharing → shared/trips#update
- Now uses: PATCH /trips/:id (existing route) with sharing params

**Controllers**
- Shared::TripsController: Simplified to only handle public view (show)
- TripsController: Added update_sharing private method to handle
  sharing params when present

**Views**
- Updated JavaScript in _sharing.html.erb to use trip_path with
  nested sharing params

**Tests**
- Updated request specs to use trip_path instead of sharing_trip_path
- All params now nested under sharing key

## Benefits
- Cleaner namespace separation (Shared:: only for public access)
- Follows Rails conventions (one update route handles everything)
- Simpler routing structure
- Reduced code duplication

## Backwards Compatibility
This is a breaking change for the sharing API endpoint, but since
this feature was just implemented and hasn't been released yet,
no migration path is needed.
2025-11-05 15:54:42 +00:00
..
api/v1 Remember enabled map layers for users 2025-10-20 20:11:28 +02:00
auth Update application_controller to store client header in session 2025-09-21 14:12:18 +02:00
concerns Fix UTM parameter assignment and update version to 0.34.2 2025-10-31 19:29:20 +01:00
family Small fixes 2025-10-22 20:39:02 +02:00
settings Update stuff, fix stuff 2025-09-29 22:27:07 +02:00
shared Refactor: Move trip sharing management to trips#update 2025-11-05 15:54:42 +00:00
users Move UTM parameter tracking logic into a concern 2025-10-30 19:59:31 +01:00
api_controller.rb Return dawarich headers on all API responses 2025-08-11 00:21:58 +02:00
application_controller.rb Make sure family invitations are handled after sign-in 2025-10-22 21:36:51 +02:00
exports_controller.rb Extract stats sharing logic to its own controller 2025-09-12 21:08:45 +02:00
families_controller.rb Extract update location sharing logic to a service object 2025-10-05 19:40:42 +02:00
home_controller.rb Introduce points counter cache to optimize performance 2025-08-21 22:32:29 +02:00
imports_controller.rb Extract stats sharing logic to its own controller 2025-09-12 21:08:45 +02:00
map_controller.rb Merge branch 'dev', remote-tracking branch 'origin' into feature/full-screen-map 2025-10-14 13:47:58 +02:00
metrics_controller.rb Use constants for metrics username and password. 2025-07-26 15:27:22 +02:00
notifications_controller.rb Add country_name to points and fix some bugs. 2025-07-28 18:53:19 +02:00
places_controller.rb Add places page 2024-08-25 20:19:02 +02:00
points_controller.rb Introduce points counter cache to optimize performance 2025-08-21 22:32:29 +02:00
settings_controller.rb Fixes for visits suggestions. 2025-07-02 23:50:32 +02:00
stats_controller.rb Add some refactorings 2025-09-13 16:41:28 +02:00
trips_controller.rb Refactor: Move trip sharing management to trips#update 2025-11-05 15:54:42 +00:00
visits_controller.rb Extract stats sharing logic to its own controller 2025-09-12 21:08:45 +02:00