Hello, I'm new to Ruby on Rails.

I am creating a form for searching purpose:

<% form_for :src_cond,
      :url => {:action =>'search'} do |p| %>
     <%= p.radio_button("bd", "1") %> a
     <%= p.radio_button("bd", "2") %> b
     <%= p.select :bd2, %w[1 2 3 4],{},{:index=>nil} %>
     <%= p.submit "Search" %>
<% end %>

When I click "Search", the browser shows:

"We're sorry, but something went wrong.  We've been notified about
this issue and we'll take a look at it shortly."

When I check the log, it says:

  Status: 500 Internal Server Error
  expected Array (got Hash) for param `src_cond'

I've put some "puts" statements in the controller, which indicates the
controller is not called at all.

If I have only radio_button or select in the form, the controller will
be called as expected.

I wonder how I may have both combo box and radio group at the same
time.

Many thanks!!

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to