Just found this post -- I''m having the exact same problem, did you
find a solution?
On Apr 20, 3:41 pm, Will Merrell
<w...-jkbzaOXREqcCMe7iY93BLQC/G2K4zDHf@public.gmane.org>
wrote:> My rails application is working correctly for everything except one
> controller/action.
>
> In development on my local machine it all works fine, but when deployed
> to the production environment, 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">
>
> Theroutesas shown by ''rakeroutes'' 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 just 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?
>
> Any help or suggestions would be appreciated.
>
> -- Will Merrell
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---