I created a new controller for one of my models called Review, and named it review_controller, i put in show and update methods in it but cant get them working because rails didn’t add the paths for the 2 methods.
I tried putting the follwoing in the routes file: match "/review/update/:id", :to => "review#update"
But it gives me a ActiveRecord::RecordNotFound (Couldn't find Review with ID=update):
app/controllers/review_controller.rb:16:in `update'
how can i add the path to the routes file to make my update and show methods work?
Thank You
For a new controller in Rails 3, you can let Rails build the routes for you like this:
And then if you were to run
rake routesin the Terminal, you’d see: