add defaults for new aliases/implications
This commit is contained in:
@@ -908,6 +908,10 @@ class Post < ActiveRecord::Base
|
||||
where("id IN (SELECT pd.post_id FROM post_disapprovals pd WHERE pd.user_id = ?)", CurrentUser.id)
|
||||
end
|
||||
|
||||
def raw_tag_match(tag)
|
||||
where("posts.tag_index @@ to_tsquery('danbooru', E?)", tag)
|
||||
end
|
||||
|
||||
def tag_match(query)
|
||||
PostQueryBuilder.new(query).build
|
||||
end
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
<div id="a-new">
|
||||
<h1>New Tag Alias</h1>
|
||||
<%= simple_form_for(@tag_alias) do |f| %>
|
||||
<%= f.input :antecedent_name, :label => "From" %>
|
||||
<%= f.input :status, :value => "pending", :as => :hidden %>
|
||||
<%= f.input :antecedent_name, :as => :string, :label => "From" %>
|
||||
<%= f.input :consequent_name, :label => "To" %>
|
||||
<%= f.input :forum_topic_id, :label => "Forum" %>
|
||||
<%= f.button :submit %>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<div id="a-new">
|
||||
<h1>New Tag Implication</h1>
|
||||
<%= simple_form_for(@tag_implication) do |f| %>
|
||||
<%= f.input :status, :value => "pending", :as => :hidden %>
|
||||
<%= f.input :antecedent_name, :label => "From" %>
|
||||
<%= f.input :consequent_name, :label => "To" %>
|
||||
<%= f.input :forum_topic_id, :label => "Forum" %>
|
||||
|
||||
Reference in New Issue
Block a user