i strongly suggest you read about RESTful design and controllers in
Rails. You should find plenty of good tutorials on google.
I don’t know how you created the controller but it is usualy used in
plural. So if you create a model Item, the created controller is
called itemS_controller.rb. This means you should try accessing /items/
add_me (why add_me and not new?) rather than /item/add_me.
The line you wrote in the routes searches for any controller matching
first “parameter” in url and action second. I’m (almost) sure your
controller is in plural and this is the reason why the route doesn’t
But you should consider making a custom route like this:
map.items “items/:action”, :controller => “items”
Then in your views you can easily make links like this:
<%= link_to ‘All items’, items_path %>
Hope it helps! And hey… find and read some tutorials on restful
On 8 avg., 16:18, Stephan M. [email protected]