user3726986
user3726986

Reputation:

Search Form In Rails Application Not Working

I am trying to implement some search functionality in application and it will be on all the pages of the application. I have put the following code in my /layout/application.html.erb but the search form is not displaying in my application.

   <span style="text-align: right">
    <% form_tag "workout_schedules/find" do %>
    <%= text_field_tag :search_string %>
    <%= submit_tag "Search" %> 
    <% end %>

Can you please suggest something so that it will work?

Upvotes: 0

Views: 39

Answers (1)

RAJ
RAJ

Reputation: 9747

You need to add = with form_tag

<%= form_tag "workout_schedules/find" do %>
   ...
<% end %>

It will make your search form visible.

Upvotes: 1

Related Questions