form_for without :html and with :remote causes an error

If you run form_for(@post, :remote => true) {|f| … } you will get “ActionView::Template::Error (You have a nil object when you didn’t expect it! You might have expected an instance of Array. The error occurred while evaluating nil.[]=)”

My patch fixes this error.

https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/4902-patch-form_for-without-html-and-with-remote-should-not-error

Any comments?

David Genord II