403 renders _list_menu which fails as no subscription was yet fetched
As a non-admin subscription, if I click on a list, I'll get redirected to the lists' subscriptions list. However, this is forbidden and I should get a 403 rendered.
But the 403 seems to try to render _list_menu, which requires a subscription and then everything fails with:
I, [2018-01-12T01:41:34.152444 #890] INFO -- : Processing by ListsController#subscriptions as HTML
I, [2018-01-12T01:41:34.152588 #890] INFO -- : Parameters: {"id"=>"256"}
I, [2018-01-12T01:41:34.359194 #890] INFO -- : Rendered errors/403.html.haml within layouts/application (0.1ms)
I, [2018-01-12T01:41:34.361528 #890] INFO -- : Rendered application/_navbar.html.haml (1.3ms)
I, [2018-01-12T01:41:34.361929 #890] INFO -- : Rendered application/_flashes.html.haml (0.1ms)
I, [2018-01-12T01:41:34.398987 #890] INFO -- : Rendered application/_list_menu.html.haml (36.4ms)
I, [2018-01-12T01:41:34.399133 #890] INFO -- : Rendered application/_page_header.html.haml (37.0ms)
I, [2018-01-12T01:41:34.399327 #890] INFO -- : Completed 500 Internal Server Error in 247ms (ActiveRecord: 0.3ms)
F, [2018-01-12T01:41:34.400451 #890] FATAL -- :
ActionView::Template::Error (No route matches {:action=>"show", :controller=>"subscriptions", :id=>nil} missing required keys: [:id]):
20: - else
21: %li
22: %span.glyphicon.glyphicon-th-list
23: = link_to_unless_current(t(".edit_subscription"), subscription_path(@subscription), accesskey: :s)
24: %li
25: = image_tag 'keyring.svg', width: '20px'
26: = link_to_unless_current(t(".keys"), list_keys_path(@list), accesskey: :k)
app/views/application/_list_menu.html.haml:23:in `_app_views_application__list_menu_html_haml__4465239743550663507_70199299835180'
app/views/application/_page_header.html.haml:4:in `_app_views_application__page_header_html_haml__3294350472607209667_70199299803220'
app/views/layouts/application.html.haml:22:in `_app_views_layouts_application_html_haml__33115434515732948_28375120'
app/controllers/application_controller.rb:19:in `block in <class:ApplicationController>'
This is schleuder-web @ 20171120 git0168d06c