Merb Routes

July 22nd, 2008 - 0 comments »

Here’s a quick rake task for you, if you want to see merb routes without having to do merb -i

desc "Show merb routes" 
task :merb_routes => :merb_env do
  require 'merb-core/rack/adapter/irb'
  Merb::Rack::Console.new.show_routes
end

In terminal, just do rake merb_routes. If you are looking for something specific, you can always do rake show_routes | grep user.

Add that to the Rakefile in your root dir, or better yet, use sake and do:

sake -i http://gist.github.com/raw/1406/907026ffe89a0ff61f7a82e9a66275611b9008a4

Then you can do sake merb_routes in any merb app dir! That’s served up straight from gist, github’s newest pastie based on git.

Tags:

 

Comments