Skip to content

Instantly share code, notes, and snippets.

@geektoo
Created September 5, 2011 19:05
Show Gist options
  • Save geektoo/1195685 to your computer and use it in GitHub Desktop.
Save geektoo/1195685 to your computer and use it in GitHub Desktop.
gist search engine form
resources :companies do
resources :departments
resources :departments do
resources :employes
end
end
@search = Company.search(params[:search])
@building = @search.all
<%= form_for @search, :as => :search, :url => advanced_search_engine_path do |f| %>
<%= f.label 'Search by Company name : '%>
<%= f.text_field :name_like %>
<%= f.text_field :departments_department_number_like%>
<%= f.text_field :employes_employe_name_like %> ??????
<%= f.submit 'Search' %>
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment