We're sorry, but something went wrong.
思いっきり凡ミス。
We're sorry, but something went wrong. We've been notified about this issue and we'll take a look at it shortly.
と怒られる。
logを見てもいまいち理由がわからず結構悩んだのだが、単純にフォームで呼び出しているインスタンス変数が初期化されていなかった。
具体的には、
.... <%= text_area 'hoge', 'piyo', 'cols' => 40, 'rows' => 4 %></p> .... <div id="add_fuga"> <%= select_tag('fuga', Fuga.find(:all, :order => "position").collect {|f| "<option value='#{f.id}'>" + f.name + '</option>'})%> <%= link_to_remote '追加', :submit => 'add_fuga', :update => 'fugas', :url => {:action => 'add_fuga'} %><br /> </div> ....
と、フォームではhogeに値をつっこんでおり、fuga部分はAjaxで処理していたと。
機能的に後付けだったもので動かなくなっていることに時間が経って気がついた*1
Controllerに一行追加して解決
def edit @hoge = Hoge.find(params[:id]) + @fuga = Fuga.new end
*1:テスト重要....