Announcement (2017-05-07): www.ruby-forum.com is now read-only since I
unfortunately do not have the time to support and maintain the forum any
more. Please see rubyonrails.org/community and ruby-lang.org/en/community
for other Rails- und Ruby-related community platforms.

I would like understood routes, scaffolding etc. "Head First Ruby on
Rails" has a very old Rails. I am working with Rails 4. On 93 page "Head
First Ruby on Rails"/polish edition/Helion 2010
there is:
ActionController::Routing::Routes.draw do |map|
map.connect '/ads/:id', :controller=> 'ads', :action=>'show'
map.connect ':controller/:action/:id'
map.conect ':controller/:action/:id.:format'
end
In "Agile Web Development in Rails 4" there is something different
and I do not know, how change to Rails4 the cod of "Head First Ruby on
Rails".
on the 92 page "Agile Web Development in Rails 4 - in English, 2013" is
something like this:
Download rails40/depot_d/config/routes.rb
Depot::Application.routes.draw do
get "store/index"
resources :products
etc...
Could Anybody help me to change/write in Rails4 the mebay.com project's
config/routes.rb?

El martes, 11 de marzo de 2014 14:18:26 UTC+1, Ruby-Forum.com User
escribió:
>> etc...>> Could Anybody help me to change/write in Rails4 the mebay.com project's> config/routes.rb?>> --> Posted via http://www.ruby-forum.com/.>
Basically since the upgrade to rails 4.
map has been deprecated, instead is more secure to specify the HTTP verb
of
the route GET, POST, PUT, PATCH, DELETE, also rails use the CRUD
structure
that stand for Create, Read, Update, Delete, this the basic actions that
rails provide inside our controller when doing a scaffold, also Index,
New.
So when creating the routes you have to specify a URL, which goes to a
controller and an action.
example:
get 'store/index', to: 'store#index', as:
"store"
HTTP URL controller#action name
the name part will give you some helper methods: store_url and
store_path.
Usually when creating a scaffold it will generate in your routes files a
line like this resources :store, which will provide all the routes for
that
controller.
This is a link explaining everything
http://guides.rubyonrails.org/routing.html.
Hope I helped you.