diff --git a/app/components/documents/fields_component.html.erb b/app/components/documents/fields_component.html.erb index 4dc0c42ff..91d1a19d5 100644 --- a/app/components/documents/fields_component.html.erb +++ b/app/components/documents/fields_component.html.erb @@ -1,4 +1,4 @@ -
+
<%= f.hidden_field :id %> <%= f.hidden_field :user_id, value: current_user.id %> <%= f.hidden_field :cached_attachment %> diff --git a/app/components/images/fields_component.html.erb b/app/components/images/fields_component.html.erb index bff9555f1..00985abc0 100644 --- a/app/components/images/fields_component.html.erb +++ b/app/components/images/fields_component.html.erb @@ -1,4 +1,4 @@ -
+
<%= f.hidden_field :id %> <%= f.hidden_field :user_id, value: current_user.id %> <%= f.hidden_field :cached_attachment %> diff --git a/spec/shared/system/nested_documentable.rb b/spec/shared/system/nested_documentable.rb index b6b1175a6..ed2eabbef 100644 --- a/spec/shared/system/nested_documentable.rb +++ b/spec/shared/system/nested_documentable.rb @@ -320,7 +320,7 @@ end def documentable_attach_new_file(path, success = true) click_link "Add new document" - document = all("#new_document").last + document = all(".document").last document_input = document.find("input[type=file]", visible: :hidden) attach_file(document_input[:id], path, make_visible: true)