In Ruby on Rails, routes.rb, if map.something will create something_path and something_url, does map

Posted by Jian Lin on Stack Overflow See other posts from Stack Overflow or by Jian Lin
Published on 2010-06-12T11:05:43Z Indexed on 2010/06/12 11:13 UTC
Read the original article Hit count: 237

In Ruby on Rails, routes.rb, if we create a "named route"

map.something ":a/:b", :controller => 'foobar'

it will also create something_path and something_url which are two methods usable in the controller and in the view. Does map.connect create something like that too? Otherwise, isn't map.connect somewhat disadvantaged in this way? I checked that connect_path and connect_url both aren't created automatically.

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about routing