From b61fdc2c6bce3caa544157ab36afed30236f9ee2 Mon Sep 17 00:00:00 2001 From: evazion Date: Wed, 26 Apr 2017 13:12:20 -0500 Subject: [PATCH] /artists: convert search form to simple form. --- app/views/artists/_search.html.erb | 33 +++++------------------------- 1 file changed, 5 insertions(+), 28 deletions(-) diff --git a/app/views/artists/_search.html.erb b/app/views/artists/_search.html.erb index 3c256ff8d..cf6a77ed3 100644 --- a/app/views/artists/_search.html.erb +++ b/app/views/artists/_search.html.erb @@ -1,28 +1,5 @@ - - - <%= form_tag(artists_path, :method => :get, :class => "simple_form") do %> - - - - - - - - - - - - <% end %> - - +<%= simple_form_for(:search, url: artists_path, method: :get, defaults: { required: false }, html: { class: "inline-form" }) do |f| %> + <%= f.input :name, label: "Name", hint: "Use * for wildcard", input_html: { value: params[:search][:name] } %> + <%= f.input :order, collection: [["Recently created", "created_at"], ["Last updated", "updated_at"], ["Name", "name"], ["Post count", "post_count"]], selected: params[:search][:order] %> + <%= f.submit "Search" %> +<% end %>