tomhughes left a comment (openstreetmap/openstreetmap-website#6564)

> I also noticed that [`HeatmapsController#show` checks for `@user` to be 
> set](https://github.com/openstreetmap/openstreetmap-website/blob/6ca74538293c56da5309fdde0a2b956207126de2/app/controllers/users/heatmaps_controller.rb#L16).
>  If it's not set, then `@heatmap_data` won't be set and the view will fail 
> anyway. From here, I think it makes sense to check for `@heatmap_data` in the 
> view, as the controller does allow for the possibility of not setting it.

Or should the controller error if asked for a heatmap when there's no user?

Note that `@user` there is derived from the arguments to the controller - it's 
not the logged in user. In fact there's no need to be logged in at all to call 
that URL so I'm not sure your theory about the missing session works?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6564#issuecomment-3612309734
You are receiving this because you are subscribed to this thread.

Message ID: 
<openstreetmap/openstreetmap-website/pull/6564/[email protected]>
_______________________________________________
rails-dev mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/rails-dev

Reply via email to