1.编辑或者删除栏目的帖子返回对应页面

This commit is contained in:
ouyangxuhua 2015-12-09 16:19:52 +08:00
parent 1a7a97dbc5
commit 78fb8b6254
3 changed files with 4 additions and 3 deletions

View File

@ -1,4 +1,4 @@
class OrgSubfield < ActiveRecord::Base class OrgSubfield < ActiveRecord::Base
belongs_to :organization, :foreign_key => :organization_id belongs_to :organization, :foreign_key => :organization_id
has_many :org_document_comments has_many :org_document_comments, :dependent => :destroy
end end

View File

@ -1,2 +1,3 @@
//location.reload(); //location.reload();
window.location.href = '<%= organization_org_document_comments_path(:organization_id => @org_document_comment.root.organization_id)%>' //window.location.href = '<%#= organization_org_document_comments_path(:organization_id => @org_document_comment.root.organization_id)%>'
window.location.reload();

View File

@ -32,7 +32,7 @@
<% end %> <% end %>
</li> </li>
<li> <li>
<%= 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" %>
</li> </li>
<li> <li>
<%= link_to "删除文章", org_document_comment_path(:id => document.id, :organization_id => document.organization_id), :method => 'delete', <%= link_to "删除文章", org_document_comment_path(:id => document.id, :organization_id => document.organization_id), :method => 'delete',