# Attachment\_fu does not invoke 'create' (POST) action

**URL:** <https://www.ruby-forum.com/t/attachment-fu-does-not-invoke-create-post-action/109412>\
**Category:** Rails\
**Created:** [July 14, 2007, 1:57pm UTC](https://www.ruby-forum.com/t/attachment-fu-does-not-invoke-create-post-action/109412 "2007-07-14T13:57:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![chirag](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ecccb3/32.png) [@chirag](https://www.ruby-forum.com/u/chirag)\
**Post date:** [July 14, 2007, 1:57pm UTC](https://www.ruby-forum.com/t/attachment-fu-does-not-invoke-create-post-action/109412/1 "2007-07-14T13:57:55Z")

</div>

When I use attachment\_fu on my hosted server (TextDrive using lighttpd

- fastCGI), I can bring up the ‘new’ action but logger shows that  
‘create’ (POST) action never gets invoked.

The weird part is that the EXACT same code works perfectly fine in  
Windows (but using Mongrel instead of lighttpd + fastCGI).

Any ideas why the POST is not invoking the ‘create’ action?

Thanks,  
Chirag

---

<div class="post-metadata">

**Author:** ![chirag](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ecccb3/32.png) [@chirag](https://www.ruby-forum.com/u/chirag)\
**Post date:** [July 16, 2007, 12:02am UTC](https://www.ruby-forum.com/t/attachment-fu-does-not-invoke-create-post-action/109412/2 "2007-07-16T00:02:26Z")

</div>

I found the answer to my own problem:

After some debugging and logging, I noticed that the ‘create’ action  
was not being registered by Rails. The ‘new’ action would jump  
straight to the ‘index’ action, which is a display list of the  
uploaded files. Thanks to Steve E.’ June 20, 2007 blog entry, I  
found a workaround. Add this to the body of the ApplicationController  
class in application.rb :

```
def default_url_options(options)
{ :trailing_slash => true }
end
```
