Rails Routes: match and mount

While working on the SlugEngine built into this blog site, I came across a note-worthy errata in the book Rails 3 in Action.

Section 18.3.1 states that the following two lines in config/routes.rb are functionally equivalent:

# method one
mount Foo::Bar, :at => 'foo/bar'

# method two
match 'foo/bar', :to => Foo::Bar

These two routes are similar. In fact, mount in turn calls match to complete the route setup. However, the difference (as of Rails 3.1.1) lies in the options that mount passes along to match. Continue reading