I just upgraded to rails 1.1. Now I’m having two problems (both seem
to be related to scaffold).
The controller in question uses scaffold, but overwrites most of the
actions (all except :show and :destroy).
When I test the application by hand, everything seems to be working
fine, except the links that call :destroy. These simply redisplay the
list, without removing any items. Functional tests also fail to
remove the item.
More oddly, when I run the functional tests, any call to
“get :create” seems to call scaffold’s :create action, not my
controller’s :create action. I’ve checked the other overwritten
actions (:list, :new and :edit), and the test correctly calls my
controller’s version of these. Just :create seems to be acting
strange. (if I comment out the call to scaffold at the top of the
controller, then the :create tests work right. Of course, this
causes :show and :destroy to stop working).
Any idea what’s going on here?
I know I could just drop scaffolding and write my own :show
and :destroy actions (and a show view). I may have to do that
for :destroy anyway (since scaffold’s version no longer seems to
work). But I’d really like to know why this is happening (and is it a
symptom of something worse going on–for example, missing an
important step while upgrading).