Dashboard view only outputs its contents if this condition is true: ```ruby if current_user and @user.id == current_user.id ```
But it's always true. The page is only accessible when authorized, therefore `current_user` is set. `current_user` is assigned to `@user`, so the `id`s are also always equal. That makes `@user` unnecessary and the entire check unnecessary. You can view, comment on, or merge this pull request online at: https://github.com/openstreetmap/openstreetmap-website/pull/5705 -- Commit Summary -- * Initialize dashboard followings and nearby users in controller * Remove current user check from dashboard view -- File Changes -- M app/controllers/dashboards_controller.rb (3) M app/views/dashboards/_contact.html.erb (4) M app/views/dashboards/show.html.erb (101) M test/controllers/dashboards_controller_test.rb (6) -- Patch Links -- https://github.com/openstreetmap/openstreetmap-website/pull/5705.patch https://github.com/openstreetmap/openstreetmap-website/pull/5705.diff -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5705 You are receiving this because you are subscribed to this thread. Message ID: <openstreetmap/openstreetmap-website/pull/5...@github.com>
_______________________________________________ rails-dev mailing list rails-dev@openstreetmap.org https://lists.openstreetmap.org/listinfo/rails-dev