dawarich/app/views/trips
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
..
_countries.html.erb Show visited countries in a modal window on the Trip page 2025-10-07 21:49:58 +02:00
_distance.html.erb Fix request to a user in partial 2025-07-26 12:37:46 +02:00
_form.html.erb Properly provide default distance unit in user settings 2025-10-20 19:42:24 +02:00
_path.html.erb Properly provide default distance unit in user settings 2025-10-20 19:42:24 +02:00
_sharing.html.erb Refactor: Move trip sharing management to trips#update 2025-11-05 15:54:42 +00:00
_trip.html.erb Properly provide default distance unit in user settings 2025-10-20 19:42:24 +02:00
edit.html.erb Fix margins on some pages 2024-11-28 15:54:36 +01:00
index.html.erb Move trip to partial 2024-11-28 16:11:04 +01:00
new.html.erb Fix margins on some pages 2024-11-28 15:54:36 +01:00
public_show.html.erb Implement public trip sharing with Shareable concern 2025-11-05 15:44:27 +00:00
show.html.erb Implement public trip sharing with Shareable concern 2025-11-05 15:44:27 +00:00