Why, in Ruby on Rails, http: // localhost: 3000 / stories / newnew will look for the id = newnew entry?
using Ruby on Rails 2.3.2 since I already created a Scaffold for the Story, so instead of experimenting and creating a new action called "new" ("new" already exists from the scaffold), I used "newnew" in the controller file and in the file kind, hoping that
would be another way to create a new record. but it turns out that RoR will treat "newnew" as a record id instead of an action, as reported:
Could not find history with ID = newnew
Is there a way to make newnew also like an action?
route.rb has
map.resources :stories
map.connect ':controller/:action/:id'
map.connect ':controller/:action/:id.:format'
and this is Rails 2.3.2
-1
a source to share
3 answers