Sneaky Abstractions

Subscribe to my Feed, follow me on , recommend me on Working With Rails or see my code on GitHub

See it in action

This form generates routes based on the routes.rb file for this site, which you can see below.

You need JavaScript to use this.
routes.rb

These are the routes defined for this site and exported to my routes.js.

ActionController::Routing::Routes.draw do |map|

  map.resources :posts, :has_many => :comments
  map.resources :pages, :has_many => :comments
  map.resources :comments, :member => { :verify => :get }
  map.resources :tags

  map.root :controller => 'posts'

  map.connect ':controller/:action/:id'
  map.connect ':controller/:action/:id.:format'
  
end

Comments

8 comments

He will bring to you a harvest of wealth, in the morning he will let loaves of bread shower down, and in the evening a rain of wheat!