mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-11 17:51:39 -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 |
||
|---|---|---|
| .. | ||
| stats_controller.rb | ||
| trips_controller.rb | ||