dawarich/spec
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
..
channels Add incremental track generation 2025-07-07 21:48:07 +02:00
factories Refactor family invitations and memberships into separate models and controllers 2025-10-07 18:38:06 +02:00
fixtures Fix import detection 2025-08-23 16:07:15 +02:00
jobs Update stuff, fix stuff 2025-09-29 22:27:07 +02:00
lib Update json_stream_handler_spec.rb path and remove tmp.json 2025-10-05 21:01:34 +02:00
mailers Update onborading popup 2025-09-18 18:29:46 +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
requests Refactor: Move trip sharing management to trips#update 2025-11-05 15:54:42 +00:00
serializers Update stuff, fix stuff 2025-09-29 22:27:07 +02:00
services Remember enabled map layers for users 2025-10-20 20:11:28 +02:00
support Clean up some mess 2025-07-20 18:57:53 +02:00
swagger/api/v1 Add swagger spec for visits api 2025-08-21 20:53:23 +02:00
system Update onborading popup 2025-09-18 18:29:46 +02:00
tasks Fix failed specs 2025-01-21 19:32:12 +01:00
rails_helper.rb Clean up some mess 2025-07-20 18:57:53 +02:00
spec_helper.rb Add spec for CheckAppVersion service 2024-04-25 22:40:51 +02:00
swagger_helper.rb Add swagger along with api/v1/points swagger doc 2024-05-18 13:35:48 +02:00