I am referring to a book according to which the “routes.rb” code is as
below:
================= [Code] =====================
MeBay::Application.routes.draw do |map|
map.connect ‘ads/:id’, :controller=>‘ads’, :action=>‘show’
map.connect ‘:controller/:action/:id’
map.connect ‘:controller/:action/:id.:format’
end
When I try to open this route from the browser by typing:
I am getting error:
=================================================
RuntimeError
You are using the old router DSL which has been removed in Rails 3.1.
Please check how to update your routes file at:
http://www.engineyard.com/blog/2010/the-lowdown-on-routes-in-rails-3/ or
add the rails_legacy_mapper gem to your Gemfile
What changes are needed?