post disapprovals: refactor disapproval reasons.
* Factor out reasons into a constant * Change column default and eliminate unused `legacy` reason.
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<%= f.input :post_id, label: "Post ID", input_html: { value: params[:search][:post_id] } %>
|
||||
<%= f.input :post_tags_match, label: "Tags", input_html: { value: params[:search][:post_tags_match], data: { autocomplete: "tag-query" } } %>
|
||||
<%= f.input :message_matches, label: "Message", input_html: { value: params[:search][:message_matches] } %>
|
||||
<%= f.input :reason, label: "Reason", collection: %w[breaks_rules disinterest poor_quality].map { |x| [x.humanize, x] }, include_blank: true, selected: params[:search][:reason] %>
|
||||
<%= f.input :reason, label: "Reason", collection: PostDisapproval::REASONS.map { |x| [x.humanize, x] }, include_blank: true, selected: params[:search][:reason] %>
|
||||
<%= f.input :has_message, label: "Has Message?", collection: %w[Yes No], include_blank: true, selected: params[:search][:has_message] %>
|
||||
<%= f.input :order, collection: [["ID", "id_desc"], ["Post ID", "post_id_desc"]], selected: params[:search][:order] %>
|
||||
<%= f.submit "Search" %>
|
||||
|
||||
Reference in New Issue
Block a user