post disapprovals: refactor disapproval reasons.

* Factor out reasons into a constant
* Change column default and eliminate unused `legacy` reason.
This commit is contained in:
evazion
2020-04-03 15:57:29 -05:00
parent 3e792019e5
commit fde42022c0
9 changed files with 20 additions and 15 deletions

View File

@@ -3,7 +3,7 @@
<%= edit_form_for(PostDisapproval.new, url: post_disapprovals_path, remote: true, html: { id: "detailed-rejection-form" }) do |f| %>
<%= f.hidden_field :post_id, value: "x" %>
<%= f.input :reason, collection: [["Breaks Rules", "breaks_rules"], ["Poor Quality", "poor_quality"], ["No interest", "disinterest"]] %>
<%= f.input :reason, collection: PostDisapproval::REASONS.map { |x| [x.humanize, x] } %>
<%= f.input :message, as: :string %>
<% end %>
</div>