Try running "rake routes" to see if the URL you get is recognized as a
resource url. Maybe the :controller/:action/:id route outranks your
resources route. The resources route should be specified higher up in
the file.
This is what my rake routes command outputs. The
encryption_passphrases resource is at the top of everything in the
application. The :controller/:action/:id route is at the very bottom.
encryption_passphrases GET /
encryption_passphrases
{:controller=>"encryption_passphrases", :action=>"index"}
formatted_encryption_passphrases GET /
encryption_passphrases.:format
{:controller=>"encryption_passphrases", :action=>"index"}
POST /
encryption_passphrases
{:controller=>"encryption_passphrases", :action=>"create"}
POST /
encryption_passphrases.:format
{:controller=>"encryption_passphrases", :action=>"create"}
new_encryption_passphrase GET /encryption_passphrases/
new
{:controller=>"encryption_passphrases", :action=>"new"}
formatted_new_encryption_passphrase GET /encryption_passphrases/
new.:format
{:controller=>"encryption_passphrases", :action=>"new"}
edit_encryption_passphrase GET /
encryption_passphrases/:id/edit
{:controller=>"encryption_passphrases", :action=>"edit"}
formatted_edit_encryption_passphrase GET /
encryption_passphrases/:id/edit.:format
{:controller=>"encryption_passphrases", :action=>"edit"}
encryption_passphrase GET /
encryption_passphrases/:id
{:controller=>"encryption_passphrases", :action=>"show"}
formatted_encryption_passphrase GET /
encryption_passphrases/:id.:format
{:controller=>"encryption_passphrases", :action=>"show"}
PUT /
encryption_passphrases/:id
{:controller=>"encryption_passphrases", :action=>"update"}
PUT /
encryption_passphrases/:id.:format
{:controller=>"encryption_passphrases", :action=>"update"}
DELETE /
encryption_passphrases/:id
{:controller=>"encryption_passphrases", :action=>"destroy"}
DELETE /
encryption_passphrases/:id.:format
{:controller=>"encryption_passphrases", :action=>"destroy"}
.
.
. {other controllers}
.
/:controller/:action/:id
/:controller/:action/:id.:format
I've worked around the issue by causing the index action to call the
create method, but I'd rather have it work as designed...