Module: Workbench::SearchHelper

Defined in:
app/helpers/workbench/search_helper.rb

Instance Method Summary collapse

Instance Method Details

#search_form_for_model(data_model) ⇒ Object



3
4
5
6
7
8
9
10
# File 'app/helpers/workbench/search_helper.rb', line 3

def search_form_for_model(data_model)
  search_partial = "#{data_model.name.tableize}_search_form"
  if self.respond_to?(search_partial)
    self.send(search_partial)
  else
    (:em, 'Search form not yet available.')
  end
end