Fix #5231: "Reason is too long" notice does not appear when editing an appeal
This commit is contained in:
@@ -42,8 +42,7 @@ class PostAppealsController < ApplicationController
|
||||
def update
|
||||
@post_appeal = authorize PostAppeal.find(params[:id])
|
||||
@post_appeal.update(permitted_attributes(@post_appeal))
|
||||
respond_with(@post_appeal) do |fmt|
|
||||
fmt.html { redirect_to post_path(@post_appeal.post) }
|
||||
end
|
||||
|
||||
respond_with(@post_appeal, location: @post_appeal.post)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -42,8 +42,7 @@ class PostFlagsController < ApplicationController
|
||||
def update
|
||||
@post_flag = authorize PostFlag.find(params[:id])
|
||||
@post_flag.update(permitted_attributes(@post_flag))
|
||||
respond_with(@post_flag) do |fmt|
|
||||
fmt.html { redirect_to post_path(@post_flag.post) }
|
||||
end
|
||||
|
||||
respond_with(@post_flag, location: @post_flag.post)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
</p>
|
||||
|
||||
<%= edit_form_for(@post_appeal) do |f| %>
|
||||
<%= f.input :reason, as: :dtext, inline: true %>
|
||||
<%= f.input :reason, as: :dtext %>
|
||||
<%= f.button :submit, "Submit" %>
|
||||
<%= dtext_preview_button "post_appeal_reason" %>
|
||||
<% end %>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
</p>
|
||||
|
||||
<%= edit_form_for(@post_flag) do |f| %>
|
||||
<%= f.input :reason, as: :dtext, inline: true %>
|
||||
<%= f.input :reason, as: :dtext %>
|
||||
<%= f.button :submit, "Submit" %>
|
||||
<%= dtext_preview_button "post_flag_reason" %>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user