Dudebot wrote: > I have this code, which is working quite well: > > <% form_tag '', :method => 'GET' do %> > <p><%= radio_button_tag :report, 'by_date', params[ :report ] ||= > 'by_date' %><b>By Date</b></p> > <p><%= radio_button_tag :report, 'by_donor', params[ :report ] == > 'by_donor' %><b>By Donor</b></p> > <p><%= submit_tag "Choose" %><p> > <% end %> > > <%= render( :partial => "orders" , :object => @orders ) %> > (Inside of the _orders partial is where params[ :report ] is > processed) > > But it's ugly in that pressing "Choose" is redundant--I want the > partial action to happen when the user simply selects the radio > button. Is there any way to do this?
Sure. There's no need for a form here as far as I can see -- just use links for the two options. > > Many TIA, > Craig Best, -- Marnen Laibow-Koser http://www.marnen.org mar...@marnen.org -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---