Map With Controller plugin
Plugin details
Documentation
Install the plugin:
ruby script/plugin install http://svn.s21g.com/public/rails/plugins/map_with_controller/
With this plugin, you can draw the routes belonging to some controller like this.
map.with_controller('posts') do |posts| posts.rss # posts_rss_path => 'posts/rss' end
As you can see, there's one more thing. I have also installed MapperWithController class into RouteSet at this plugin for making named routes be completely DRY.
class MapperWithController def initialize(mapper) @mapper = mapper end def method_missing(name, *args, &block) path, *args = args path ||= name.to_s args.unshift path @mapper.send name, *args, &block end end
map.namespace :posts does nearly same thing, but it couldn't be used for this purpose because of it is optimized to making namespaces for a routing.
Further Documentation
There is currently no advanced documentation for this plugin.
New documentationEdit plugin | (0 older versions) | Last edited by: hardway, about 1 month ago

