mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-11 09:41:40 -05:00
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. |
||
|---|---|---|
| .. | ||
| active_storage/blobs | ||
| application | ||
| devise | ||
| exports | ||
| families | ||
| family/invitations | ||
| family_mailer | ||
| home | ||
| imports | ||
| layouts | ||
| map | ||
| notifications | ||
| places | ||
| points | ||
| settings | ||
| shared | ||
| stats | ||
| trips | ||
| users_mailer | ||
| visits | ||