Skip to content

Instantly share code, notes, and snippets.

@j-mcnally
Created February 7, 2013 22:10
Show Gist options
  • Select an option

  • Save j-mcnally/4734706 to your computer and use it in GitHub Desktop.

Select an option

Save j-mcnally/4734706 to your computer and use it in GitHub Desktop.
module ActionDispatch
module Routing
class Mapper
def include_routes(file)
file = File.new("#{Rails.root}/config/routes/#{file}.rb", "r")
buffer = ""
while (line = file.gets)
buffer += line
end
file.close
eval(buffer)
end
end
end
end
require "#{Rails.root}/lib/include_routes"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment