mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-11 09:41:40 -05:00
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 |
||
|---|---|---|
| .. | ||
| api/v1 | ||
| auth | ||
| concerns | ||
| family | ||
| settings | ||
| shared | ||
| users | ||
| api_controller.rb | ||
| application_controller.rb | ||
| exports_controller.rb | ||
| families_controller.rb | ||
| home_controller.rb | ||
| imports_controller.rb | ||
| map_controller.rb | ||
| metrics_controller.rb | ||
| notifications_controller.rb | ||
| places_controller.rb | ||
| points_controller.rb | ||
| settings_controller.rb | ||
| stats_controller.rb | ||
| trips_controller.rb | ||
| visits_controller.rb | ||