diff --git a/app/models/org_subfield.rb b/app/models/org_subfield.rb index 087120b69..efe9699c3 100644 --- a/app/models/org_subfield.rb +++ b/app/models/org_subfield.rb @@ -1,4 +1,4 @@ class OrgSubfield < ActiveRecord::Base belongs_to :organization, :foreign_key => :organization_id - has_many :org_document_comments + has_many :org_document_comments, :dependent => :destroy end \ No newline at end of file diff --git a/app/views/org_document_comments/destroy.js.erb b/app/views/org_document_comments/destroy.js.erb index adbeff4a6..d35489452 100644 --- a/app/views/org_document_comments/destroy.js.erb +++ b/app/views/org_document_comments/destroy.js.erb @@ -1,2 +1,3 @@ //location.reload(); -window.location.href = '<%= organization_org_document_comments_path(:organization_id => @org_document_comment.root.organization_id)%>' \ No newline at end of file +//window.location.href = '<%#= organization_org_document_comments_path(:organization_id => @org_document_comment.root.organization_id)%>' +window.location.reload(); \ No newline at end of file diff --git a/app/views/organizations/_show_org_document.html.erb b/app/views/organizations/_show_org_document.html.erb index 7a87c55a0..2b0f11cdd 100644 --- a/app/views/organizations/_show_org_document.html.erb +++ b/app/views/organizations/_show_org_document.html.erb @@ -32,7 +32,7 @@ <% end %>
  • - <%= link_to "编辑文章", edit_org_document_comment_path(:id => document.id, :organization_id => document.organization_id, :flag => flag, :org_subfield_id => org_subfield_id), :class => "postOptionLink" %> + <%= link_to "编辑文章", edit_org_document_comment_path(:id => document.id, :organization_id => document.organization_id, :flag => flag, :org_subfield_id => params[:org_subfield_id] ), :class => "postOptionLink" %>
  • <%= link_to "删除文章", org_document_comment_path(:id => document.id, :organization_id => document.organization_id), :method => 'delete',