Move post replacement create action to post replacements controller.

This commit is contained in:
evazion
2017-05-14 18:52:34 -05:00
parent cb09b6661d
commit 648cc9ecb7
9 changed files with 35 additions and 25 deletions

View File

@@ -55,7 +55,7 @@
<li><%= link_to "Expunge", expunge_moderator_post_post_path(:post_id => post.id), :remote => true, :method => :post, :id => "expunge", :data => {:confirm => "This will permanently delete this post (meaning the file will be deleted). Are you sure you want to delete this post?"} %></li>
<% end %>
<li><%= link_to "Replace Image", replace_moderator_post_post_path(:post_id => post.id), :id => "replace-image" %></li>
<li><%= link_to "Replace Image", new_post_replacement_path(:post_id => post.id), :id => "replace-image" %></li>
<li id="mobile-version-list"><%= link_to "Mobile version", mobile_post_path(post) %></li>
<% end %>

View File

@@ -122,7 +122,7 @@
</div>
<div id="replace-image-dialog" class="prose" title="Replace image" style="display: none;">
<%= render "moderator/post/posts/replace" %>
<%= render "post_replacements/new", post_replacement: @post.replacements.new %>
</div>
<div id="add-to-pool-dialog" title="Add to pool" style="display: none;">