I’m developing a rails project and I need to load search results on particular div. Can someone explain me how to do this on rails 2.3.8 ?
This is my event model
create_table "events", :force => true do |t|
t.string "name"
t.date "start_at"
t.date "end_at"
t.datetime "created_at"
t.datetime "updated_at"
t.string "trainer_id"
t.string "venue_id"
t.string "description"
t.boolean "holy"
t.integer "nxt"
t.string "country_id"
end
This is my search form
<% form_tag "/events/find_trainer" do %>
<%= collection_select("event", "trainer_id", @trainers , :id, :name, {:prompt => true}) %>
<%= submit_tag "search" %>
Can some experts share your ideas about this ?
You can do it w/o form using observe_field
Controller Code