fixes #1560
This commit is contained in:
@@ -47,6 +47,10 @@ class UserFeedback < ActiveRecord::Base
|
||||
q = q.where("creator_id = (select _.id from users _ where lower(_.name) = ?)", params[:creator_name].mb_chars.downcase)
|
||||
end
|
||||
|
||||
if params[:category].present?
|
||||
q = q.where("category = ?", params[:category])
|
||||
end
|
||||
|
||||
q
|
||||
end
|
||||
end
|
||||
|
||||
@@ -3,9 +3,18 @@
|
||||
<h1>Search User Feedbacks</h1>
|
||||
|
||||
<%= form_tag(user_feedbacks_path, :method => :get, :class => "simple_form") do %>
|
||||
<%= search_field "user_name", :label => "User" %>
|
||||
<%= search_field "creator_name", :label => "Creator" %>
|
||||
<%= submit_tag "Search" %>
|
||||
<div class="input">
|
||||
<%= search_field "user_name", :label => "User" %>
|
||||
|
||||
<%= search_field "creator_name", :label => "Creator" %>
|
||||
|
||||
<label for="search_category">Category</label>
|
||||
<%= select "search", "category", %w(positive negative neutral) %>
|
||||
</div>
|
||||
|
||||
<div class="input">
|
||||
<%= submit_tag "Search" %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user