module Rails::Generators::Actions

def route(routing_code)


route "root :to => 'welcome'"

=== Example

Make an entry in Rails routing file config/routes.rb
def route(routing_code)
  log :route, routing_code
  sentinel = /\.routes\.draw do(?:\s*\|map\|)?\s*$/
  in_root do
    inject_into_file 'config/routes.rb', "\n  #{routing_code}\n", { :after => sentinel, :verbose => false }
  end
end