1つのボタンで2つのフォームを送信したい。
以下の私のコードの場合:-
rate.rb
belongs_to :target, :polymorphic => true
belongs_to :location
location.rb
has_many :rates
event.rb
has_many :rates, :as => :target
form.html.haml
= form_for [@event, @rate] do |form|
%ul
%li= form.radio_button :rate, "Excellent"
%li Excellent
%li= form.radio_button :rate, "Okay"
%li Okay
%li= form.radio_button :rate, "Poorly organized"
%li Poorly organized
%li= form.radio_button :rate, "Didn't happen"
%li Didn't happen
=form_for [@event.location, @rate] do |form|
%ul
%li= form.radio_button :rate, "Excellent"
%li Excellent
%li= form.radio_button :rate, "Okay"
%li Okay
%li= form.radio_button :rate, "Nothing special"
%li Nothing special
これはどのように行うことができますか?