In your main#company_post
method, put the following:
redirect_to "/company/#{params[:symbol]}"
So the routes should be:
get "/company/:symbol" => "main#company"
post "/company" => "main#company_post"
The controller:
def company_post
redirect_to "/company/#{params[:symbol]}"
end
The view:
<%= form_tag("/company", method: :post) do %>
<%= search_field_tag(:symbol, "Enter symbol") %>
<%= submit_tag ("Search") %>
<% end %>