I have a search box at the top of my view as follows
<%= form_tag clients_path(@client), :method => 'get' do %>
<h2> Search for Workflows </h2>
<p>
<%= text_field_tag :search, params[:search] %>
<%= submit_tag "Search", :name => nil %>
</p>
<% end %>
This is calling my show controller
def show
@client = Client.find(params[:id])
@workflows_raw = Workflow.where(:client_id => @client.id)
unless params[:search].blank?
@workflows_raw = @workflows_raw.search(params[:search])
end
@workflows = @workflows_raw.sort_by {|flow| flow.name}
respond_to do |format|
format.html
format.js
end
end
What I am getting back is this:
http://localhost:3000/clients.4?utf8=%E2%9C%93&search=Add
What I WANT to get back is this: (Note the slash)
http://localhost:3000/clients/4?utf8=%E2%9C%93&search=Add
What am I missing?