Skip to content

Instantly share code, notes, and snippets.

class ActionDispatch::Routing::Mapper
def draw(routes_name)
instance_eval(File.read(Rails.root.join("config/routes/#{routes_name}.rb")))
end
end
BCX::Application.routes.draw do
draw :api
draw :account
draw :session
@tal
tal / log.rb
Created May 10, 2011 15:13
A fast and easy way to make logs
module Log
LOGS = Hash.new {|h,k| h[k] = Logger.new("log/#{k}.log")}
extend self
def method_missing name
LOGS[name]
end
end