I need help with a form_tag in Rails. Here is the code snippet:
<%= form_tag(listings_path, method: :get) do %>
What
<%= text_field_tag :title, "",class: 'form-control' %>
Category
<%= select_tag(:category_id, options_from_collection_for_select(Category.all, :id, :name), { :prompt => 'All Categories' }) %>
Area
<%= select_tag(:area, options_for_select(['All', 'Ireland', 'UK']), class: "form-control") %>
<%= submit_tag 'Search', name: nil, class: "btn btn-primary" %>
<% end %>
I'm having trouble adding the CSS option >> class: "form-control" << for the Area field. Can anyone suggest where I should add it to make it work correctly? I've tried a few suggestions from Stack Overflow but haven't had any success yet.