In development on my local machine it all works fine, but when deployed to the production environment on hostingrails, the new form is mis-routed when submitted. Instead of calling the create action as it should it goes directly to the index action and the create is never called.
The form in question is a photo upload form. The generated form tag is:
<form action="/photos" class="new_photo" enctype="multipart/form-data" id="new_photo" method="post">
The routes as shown by 'rake routes' are: photos GET /photos {:controller=>"photos", :action=>"index"}
formatted_photos GET /photos.:format {:controller=>"photos", :action=>"index"}
POST /photos {:controller=>"photos", :action=>"create"}
POST /photos.:format {:controller=>"photos", :action=>"create"}
The production log shows that right after the new action the next action is the index action.All of this works in development, other very similar controllers that don't have the enctype="multipart/form-data" (that is just normal text forms) work jsut fine, the behavior is the same on different browsers. The production environment is fastcgi, while the development environment is a standard mongrel. Both are Rails 2.0.2.
So, My question is Why do this not work? Why does this one form go to the GET action when it should go to the POST action?
-- Will Merrell