We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rails 2.3.2.
I created a new project. Installed the resources_controller plugin. Generated scaffold for a model:
ruby script\generate scoffold projects title:string description:text resources:text created_by:integer.
Edited projects_controller to remove rails generated scaffolding, and make it:
class ProjectsController < ApplicationController resources_controller_for :projects end
Then ran rake test
Functional test (generated by scaffold) fails on should_destroy.
Redirect should be to
test_should_destroy_project(ProjectsControllerTest): Expected response to be a redirect to http://test.host/projects but was a redirect to http://test.host/projects.%23%3Cproject:0x54c11fc%3E.
It looks like a bug: .%23%3Cproject:0x54c11fc%3E is an object where an empty string was expected. But maybe I missed something in the configuration.
Routes file looks normal enough:
(in D:/InstantRails-2.0-win/rails_apps/test-rc) projects GET /projects(.:format) {:controller=>"projects", :action=>"index"} POST /projects(.:format) {:controller=>"projects", :action=>"create"} new_project GET /projects/new(.:format) {:controller=>"projects", :action=>"new"} edit_project GET /projects/:id/edit(.:format) {:controller=>"projects", :action=>"edit"} project GET /projects/:id(.:format) {:controller=>"projects", :action=>"show"} PUT /projects/:id(.:format) {:controller=>"projects", :action=>"update"} DELETE /projects/:id(.:format) {:controller=>"projects", :action=>"destroy"} /:controller/:action/:id /:controller/:action/:id(.:format)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Rails 2.3.2.
I created a new project. Installed the resources_controller plugin. Generated scaffold for a model:
ruby script\generate scoffold projects title:string description:text resources:text created_by:integer.
Edited projects_controller to remove rails generated scaffolding, and make it:
class ProjectsController < ApplicationController
resources_controller_for :projects
end
Then ran rake test
Functional test (generated by scaffold) fails on should_destroy.
Redirect should be to
test_should_destroy_project(ProjectsControllerTest):
Expected response to be a redirect to http://test.host/projects but was a redirect to http://test.host/projects.%23%3Cproject:0x54c11fc%3E.
It looks like a bug: .%23%3Cproject:0x54c11fc%3E is an object where an empty string was expected. But maybe I missed something in the configuration.
Routes file looks normal enough:
(in D:/InstantRails-2.0-win/rails_apps/test-rc)
projects GET /projects(.:format) {:controller=>"projects", :action=>"index"}
POST /projects(.:format) {:controller=>"projects", :action=>"create"}
new_project GET /projects/new(.:format) {:controller=>"projects", :action=>"new"}
edit_project GET /projects/:id/edit(.:format) {:controller=>"projects", :action=>"edit"}
project GET /projects/:id(.:format) {:controller=>"projects", :action=>"show"}
PUT /projects/:id(.:format) {:controller=>"projects", :action=>"update"}
DELETE /projects/:id(.:format) {:controller=>"projects", :action=>"destroy"}
/:controller/:action/:id
/:controller/:action/:id(.:format)
The text was updated successfully, but these errors were encountered: