diff --git a/app/views/request/details.html.erb b/app/views/request/details.html.erb index 3db0311021..daf2cde3ce 100644 --- a/app/views/request/details.html.erb +++ b/app/views/request/details.html.erb @@ -25,7 +25,7 @@ :site_name => site_name, :contact_path => help_contact_path) %>
-<% columns = ['id', 'event_type', 'created_at', 'described_state', 'calculated_state', 'last_described_at' ] %> +<% columns = ['id', 'event_type', 'details', 'created_at', 'described_state', 'calculated_state', 'last_described_at' ] %><% - d = info_request_event.send(column) + if column == 'details' + d = info_request_event.params_diff[:new].keys().join(', ') + else + d = info_request_event.send(column) + end if column == 'event_type' and d == 'edit' d = 'edit metadata' end diff --git a/spec/views/request/details.html.erb_spec.rb b/spec/views/request/details.html.erb_spec.rb index be164feb76..af47c2cc26 100644 --- a/spec/views/request/details.html.erb_spec.rb +++ b/spec/views/request/details.html.erb_spec.rb @@ -7,7 +7,8 @@ end it "should show the request" do - FactoryBot.create(:info_request_event, + FactoryBot.create( + :info_request_event, event_type: 'edit', info_request: mock_request, params: { @@ -19,5 +20,6 @@ assign :info_request, mock_request render expect(rendered).to have_content('edit metadata') + expect(rendered).to have_content('allow_new_responses_from') end end |