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

@@ -0,0 +1,11 @@
<%= simple_form_for(post_replacement, url: post_replacements_path(post_id: post_replacement.post_id), method: :post) do |f| %>
<h1>Replace Image</h1>
<p>
Delete the current image and replace it with another one, keeping
everything else in the post intact. This is meant for upgrading
lower-quality images, such as image samples, to higher-quality versions.
</p>
<%= f.input :replacement_url, label: "New Source", input_html: { value: "" } %>
<% end %>

View File

@@ -0,0 +1,5 @@
<div id="c-post-replacements">
<div id="a-new">
<%= render "new", post_replacement: @post.replacements.new %>
</div>
</div>