Skip to content

Latest commit

 

History

History
14 lines (10 loc) · 450 Bytes

2010-12-29-rails-routes-dsl.md

File metadata and controls

14 lines (10 loc) · 450 Bytes
layout title
post
Rails 3 routing DSL implementation

I picked out the bare essentials from the rails 3 routing code to expose how this DSL is implemented. Here it is.

<script src="https://gist.github.com/757889.js?file=rails-routes.rb"> </script>

RouteSet's responsibility is to store the routes. It hands off responsibility for creating those routes to Mapper.

Mapper contains the DSL, the high level API layered onto RouteSet.