Skip to content
Browse files

Fix documents module paths, they were wrong or using the wrong method.

  • Loading branch information...
1 parent 33f3503 commit 21d589c6028b96a24181c1cef9de7766b63629ca @paneidos committed Mar 19, 2012
Showing with 3 additions and 3 deletions.
  1. +1 −1 app/views/documents/index.html.erb
  2. +1 −1 app/views/documents/new.html.erb
  3. +1 −1 app/views/documents/show.html.erb
View
2 app/views/documents/index.html.erb
@@ -7,7 +7,7 @@
<div id="add-document" style="display:none;">
<h2><%=l(:label_document_new)%></h2>
-<%= form_tag({:controller => 'documents', :action => 'new', :project_id => @project}, :class => "tabular", :multipart => true) do %>
+<%= form_tag(project_documents_path(:project_id => @project), :class => "tabular", :multipart => true) do %>
<%= render :partial => 'documents/form' %>
<div class="box">
<p><label><%=l(:label_attachment_plural)%></label><%= render :partial => 'attachments/form' %></p>
View
2 app/views/documents/new.html.erb
@@ -1,6 +1,6 @@
<h2><%=l(:label_document_new)%></h2>
-<%= form_tag({:controller => 'documents', :action => 'new', :project_id => @project}, :class => "tabular", :multipart => true) do %>
+<%= form_tag(project_documents_path(:project_id => @project), :class => "tabular", :multipart => true) do %>
<%= render :partial => 'documents/form' %>
<div class="box">
View
2 app/views/documents/show.html.erb
@@ -1,6 +1,6 @@
<div class="contextual">
<%= link_to_if_authorized l(:button_edit), {:controller => 'documents', :action => 'edit', :id => @document}, :class => 'icon icon-edit', :accesskey => accesskey(:edit) %>
-<%= link_to_if_authorized l(:button_delete), {:controller => 'documents', :action => 'destroy', :id => @document}, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-del' %>
+<%= link_to_if_authorized l(:button_delete), {:controller => 'documents', :action => 'destroy', :id => @document}, :confirm => l(:text_are_you_sure), :method => :delete, :class => 'icon icon-del' %>
</div>
<h2><%=h @document.title %></h2>

0 comments on commit 21d589c

Please sign in to comment.
Something went wrong with that request. Please try again.