rendering list_menu for a non-admin subscription on key adding page fails
If a user that is a non-admin subscription on a list goes to the key upload form, it errors with:
I, [2017-09-18T16:31:12.961962 #14447] INFO -- : Started GET "/lists/2/keys/new" for 127.0.0.1 at 2017-09-18 16:31:12 +0200
I, [2017-09-18T16:31:12.965443 #14447] INFO -- : Processing by KeysController#new as HTML
I, [2017-09-18T16:31:12.965725 #14447] INFO -- : Parameters: {"list_id"=>"2"}
I, [2017-09-18T16:31:13.001546 #14447] INFO -- : Rendered keys/new.html.haml within layouts/application (4.1ms)
I, [2017-09-18T16:31:13.005090 #14447] INFO -- : Rendered application/_navbar.html.haml (1.9ms)
I, [2017-09-18T16:31:13.005651 #14447] INFO -- : Rendered application/_flashes.html.haml (0.2ms)
I, [2017-09-18T16:31:13.496296 #14447] INFO -- : Rendered application/_list_menu.html.haml (489.6ms)
I, [2017-09-18T16:31:13.496577 #14447] INFO -- : Rendered application/_page_header.html.haml (490.6ms)
I, [2017-09-18T16:31:13.497194 #14447] INFO -- : Completed 500 Internal Server Error in 531ms (ActiveRecord: 0.8ms)
F, [2017-09-18T16:31:13.500183 #14447] FATAL -- :
ActionView::Template::Error (No route matches {:action=>"show", :controller=>"subscriptions", :id=>nil} missing required keys: [:id]):
6: - else
7: %li
8: %span.glyphicon.glyphicon-th-list
9: = link_to_unless_current(t(".edit_subscription"), subscription_path(@subscription), accesskey: :s)
10: %li
11: = image_tag 'keyring.svg', width: '20px'
12: = link_to_unless_current(t(".keys"), list_keys_path(@list), accesskey: :k)
app/views/application/_list_menu.html.haml:9:in `_app_views_application__list_menu_html_haml__3378481740213318084_30504440'
app/views/application/_page_header.html.haml:4:in `_app_views_application__page_header_html_haml__2370798990065128157_30278500'
app/views/layouts/application.html.haml:22:in `_app_views_layouts_application_html_haml__2240326263790602971_20947240'
Edited by ng